mirror of
https://github.com/Rushilwiz/SkoolOS.git
synced 2025-04-09 15:00:21 -04:00
Few lines of code that fix the CLI
This commit is contained in:
parent
3c87070aba
commit
7926dea6b5
|
@ -164,11 +164,16 @@ class Teacher:
|
||||||
os.mkdir(self.username + "/" + c)
|
os.mkdir(self.username + "/" + c)
|
||||||
print("Updated: " + c)
|
print("Updated: " + c)
|
||||||
command("touch " + self.username + "/" + c + "/README.md")
|
command("touch " + self.username + "/" + c + "/README.md")
|
||||||
os.makedirs(self.username + "/Students/" + c)
|
try:
|
||||||
|
os.makedirs(self.username + "/Students/" + c)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
else:
|
else:
|
||||||
os.makedirs(self.username + "/Students")
|
try:
|
||||||
|
os.makedirs(self.username + "/Students")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
# 2020-05-11 12:25:00
|
# 2020-05-11 12:25:00
|
||||||
|
|
||||||
# class name format: <course-name>_<ion_user>
|
# class name format: <course-name>_<ion_user>
|
||||||
|
@ -299,7 +304,10 @@ class Teacher:
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
f = open(path + "/README.md", "w")
|
f = open(path + "/README.md", "w")
|
||||||
f.close()
|
f.close()
|
||||||
os.makedirs(self.username + "/Students/" + cname)
|
try:
|
||||||
|
os.makedirs(self.username + "/Students/" + cname)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
# push to remote repo
|
# push to remote repo
|
||||||
# os.chdir(path)
|
# os.chdir(path)
|
||||||
# for a in assignments:
|
# for a in assignments:
|
||||||
|
@ -740,10 +748,10 @@ class Teacher:
|
||||||
print("heheheh")
|
print("heheheh")
|
||||||
|
|
||||||
|
|
||||||
data = getTeacher("eharris1",'hackgroup1')
|
#data = getTeacher("eharris1",'hackgroup1')
|
||||||
# print(data)
|
# print(data)
|
||||||
t = Teacher(data, 'hackgroup1')
|
#t = Teacher(data, 'hackgroup1')
|
||||||
t.addAssignment("eharris1/Truck_eharris1/Assignment1", "Truck_eharris1", '2020-08-11 16:58:33.383124')
|
#t.addAssignment("eharris1/Truck_eharris1/Assignment1", "Truck_eharris1", '2020-08-11 16:58:33.383124')
|
||||||
|
|
||||||
# t.makeClass("APLit_eharris1")
|
# t.makeClass("APLit_eharris1")
|
||||||
# t.updateAssignment("eharris1/APLit_eharris1/BookReport", "APLit_eharris1", '2020-08-11 16:58:33.383124')
|
# t.updateAssignment("eharris1/APLit_eharris1/BookReport", "APLit_eharris1", '2020-08-11 16:58:33.383124')
|
||||||
|
|
|
@ -244,7 +244,7 @@ def teacherCLI(user, password):
|
||||||
# selected a class
|
# selected a class
|
||||||
else:
|
else:
|
||||||
#Pull confirmed students directory
|
#Pull confirmed students directory
|
||||||
teacher.getStudents(course)
|
#teacher.getStudents(course)
|
||||||
option = classOptionsTeacher(teacher, course)
|
option = classOptionsTeacher(teacher, course)
|
||||||
if option == '1':
|
if option == '1':
|
||||||
EXIT = addStudentsTeacher(teacher, course)
|
EXIT = addStudentsTeacher(teacher, course)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user