mirror of
https://github.com/Rushilwiz/SkoolOS.git
synced 2025-04-16 02:10:19 -04:00
basic student cli done
This commit is contained in:
parent
4241f51fa0
commit
f7624c3284
|
@ -595,9 +595,6 @@ class Teacher:
|
||||||
os.chdir(cdir)
|
os.chdir(cdir)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def comment(self):
|
|
||||||
print("heheheh")
|
|
||||||
|
|
||||||
|
|
||||||
# data = getTeacher("eharris1")
|
# data = getTeacher("eharris1")
|
||||||
# t = Teacher(data)
|
# t = Teacher(data)
|
||||||
|
|
23
skoolos.py
23
skoolos.py
|
@ -78,9 +78,8 @@ def main():
|
||||||
else:
|
else:
|
||||||
teacherCLI(USER, PWD)
|
teacherCLI(USER, PWD)
|
||||||
|
|
||||||
|
################################################ STUDENT METHODS
|
||||||
|
|
||||||
# while True:
|
|
||||||
# pass
|
|
||||||
def studentCLI(user, password):
|
def studentCLI(user, password):
|
||||||
from CLI import student
|
from CLI import student
|
||||||
data = getUser(user, password, 'student')
|
data = getUser(user, password, 'student')
|
||||||
|
@ -91,8 +90,6 @@ def studentCLI(user, password):
|
||||||
course = chooseClassStudent(student)
|
course = chooseClassStudent(student)
|
||||||
EXIT = classOptionsStudent(student, course)
|
EXIT = classOptionsStudent(student, course)
|
||||||
|
|
||||||
|
|
||||||
################################################ STUDENT METHODS
|
|
||||||
#return class
|
#return class
|
||||||
def chooseClassStudent(student):
|
def chooseClassStudent(student):
|
||||||
carray = student.sclass.split(",")
|
carray = student.sclass.split(",")
|
||||||
|
@ -141,6 +138,22 @@ def classOptionsStudent(student, course):
|
||||||
|
|
||||||
|
|
||||||
################################################ TEACHER METHODS
|
################################################ TEACHER METHODS
|
||||||
|
def chooseGeneralTeacher(teacher):
|
||||||
|
carray = []
|
||||||
|
for c in teacher.classes:
|
||||||
|
carray.append(c)
|
||||||
|
carray.append("Make New Class")
|
||||||
|
carray.append("Exit SkoolOS")
|
||||||
|
courses = [
|
||||||
|
{
|
||||||
|
'type': 'list',
|
||||||
|
'name': 'course',
|
||||||
|
'choices':carray,
|
||||||
|
'message': 'Select class: ',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
course = prompt(courses)['course']
|
||||||
|
return course
|
||||||
|
|
||||||
def teacherCLI(user, password):
|
def teacherCLI(user, password):
|
||||||
from CLI import teacher
|
from CLI import teacher
|
||||||
|
@ -307,6 +320,8 @@ def teacherCLI(user, password):
|
||||||
due = due + ":33.383124"
|
due = due + ":33.383124"
|
||||||
teacher.addAssignment(apath, course, due)
|
teacher.addAssignment(apath, course, due)
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
|
||||||
def getUser(ion_user, password, utype):
|
def getUser(ion_user, password, utype):
|
||||||
if('student' in utype):
|
if('student' in utype):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user