mirror of
https://github.com/Rushilwiz/SkoolOS.git
synced 2025-04-16 02:10:19 -04:00
formatting
This commit is contained in:
parent
1910502161
commit
d4be5f9eb8
10
skoolos.py
10
skoolos.py
|
@ -193,6 +193,7 @@ def teacherCLI(user, password):
|
|||
else:
|
||||
EXIT = True
|
||||
|
||||
|
||||
def chooseGeneralTeacher(teacher):
|
||||
carray = []
|
||||
for c in teacher.classes:
|
||||
|
@ -210,6 +211,7 @@ def chooseGeneralTeacher(teacher):
|
|||
course = prompt(courses)['course']
|
||||
return course
|
||||
|
||||
|
||||
def makeClassTeacher(teacher):
|
||||
questions = [
|
||||
{
|
||||
|
@ -258,6 +260,7 @@ def makeClassTeacher(teacher):
|
|||
teacher.reqAddStudentList(students, cname)
|
||||
return False
|
||||
|
||||
|
||||
def classOptionsTeacher(teacher, course):
|
||||
print("Class: " + course)
|
||||
unconf = getDB(teacher.username, teacher.password, "http://localhost:8000/api/classes/" + course)['unconfirmed']
|
||||
|
@ -275,6 +278,7 @@ def classOptionsTeacher(teacher, course):
|
|||
option = prompt(questions)['course'].split(")")[0]
|
||||
return option
|
||||
|
||||
|
||||
def addStudentsTeacher(teacher, course):
|
||||
soption = ["1) Add individual student", "2) Add list of students through path", "3) Exit"]
|
||||
questions = [
|
||||
|
@ -318,6 +322,7 @@ def addStudentsTeacher(teacher, course):
|
|||
else:
|
||||
return True
|
||||
|
||||
|
||||
def addAssignmentTeacher(teacher, course):
|
||||
nlist = os.listdir(teacher.username + "/" + course)
|
||||
alist = getDB(teacher.username, teacher.password, "http://localhost:8000/api/classes/" + course)['assignments']
|
||||
|
@ -336,11 +341,11 @@ def addAssignmentTeacher(teacher, course):
|
|||
if (b):
|
||||
tlist.append(n)
|
||||
|
||||
|
||||
nlist = tlist
|
||||
if (len(nlist) == 0):
|
||||
print("No new assignments found")
|
||||
print("To make an assignment: make a subdirectory in the " + course + " folder. Add a file within the new folder")
|
||||
print(
|
||||
"To make an assignment: make a subdirectory in the " + course + " folder. Add a file within the new folder")
|
||||
return False
|
||||
questions = [
|
||||
{
|
||||
|
@ -368,6 +373,7 @@ def addAssignmentTeacher(teacher, course):
|
|||
teacher.addAssignment(apath, course, due)
|
||||
return False
|
||||
|
||||
|
||||
def viewStudentsTeacher(teacher, course):
|
||||
data = getDB(teacher.username, teacher.password, "http://127.0.0.1:8000/api/classes/" + course)
|
||||
students = data["confirmed"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user