diff --git a/2022rkhondak b/2022rkhondak deleted file mode 160000 index 8dca8b7..0000000 --- a/2022rkhondak +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8dca8b78c03fab721e9976a4675e2996802328a7 diff --git a/CLI/s-git.py b/CLI/s-git.py index 46d69bc..9c2b514 100644 --- a/CLI/s-git.py +++ b/CLI/s-git.py @@ -291,4 +291,4 @@ class Student: data = getStudent("2022rkhondak") s = Student(data) -s.update() \ No newline at end of file +#s.update() \ No newline at end of file diff --git a/CLI/t-git.py b/CLI/t-git.py index bddcb4c..84d1d4e 100644 --- a/CLI/t-git.py +++ b/CLI/t-git.py @@ -373,6 +373,17 @@ class Teacher: #confirmed students def addStudent(self, student, classes): + for c in self.classes: + if(c['name'] == classes): + cid = c['id'] + data = getDB("http://127.0.0.1:8000/classes/" + str(cid)) + if(student in data['confirmed']): + print("Student already added to " + classes) + return + if(student in data['unconfirmed']): + print("Student has been enrolled in " + classes) + return + cdir = os.getcwd() cpath = self.username + "/" + classes path = self.username + "/Students/" + classes @@ -403,5 +414,5 @@ data = getTeacher("mlauerbach") t = Teacher(data) t.makeClass("Math5_mlauerbach", ["Week1_HW", "Test1"]) input() -t.reqStudent() +t.reqStudent("2022rkhondak", "Math5_mlauerbach") t.addStudent("2022rkhondak", "Math5_mlauerbach") diff --git a/CLI/test.py b/CLI/test.py deleted file mode 100644 index 11389ac..0000000 --- a/CLI/test.py +++ /dev/null @@ -1,16 +0,0 @@ -import subprocess -import os -import time - -def command(command): - ar = [] - command = command.split(" ") - for c in command: - ar.append(c) - process = subprocess.Popen(ar, stdout=subprocess.PIPE,stderr=subprocess.PIPE) - p=process.poll() - output = process.communicate()[0] - print(output) - -command('echo hello') -command('python runtest.py') diff --git a/fork/English11_eharris1 b/fork/English11_eharris1 deleted file mode 160000 index ead6265..0000000 --- a/fork/English11_eharris1 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ead6265a08327f2cc099d1e61c01030d916e8cd9