Merge branch 'master' of github.com:Rushilwiz/SkoolOS

This commit is contained in:
Nathaniel Kenschaft 2020-06-17 00:52:23 -04:00
commit 6bfdadf162
2 changed files with 13 additions and 5 deletions

View File

@ -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:

View File

@ -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)