mirror of
https://github.com/Rushilwiz/SkoolOS.git
synced 2025-04-16 02:10:19 -04:00
Merge branch 'development' of github.com:Rushilwiz/SkoolOS into development
This commit is contained in:
commit
4143c8e8c5
|
@ -186,6 +186,7 @@ class Student:
|
||||||
print("ADDING CLASS: " + str(c['name']))
|
print("ADDING CLASS: " + str(c['name']))
|
||||||
self.addClass(str(c['name']))
|
self.addClass(str(c['name']))
|
||||||
command("git checkout master")
|
command("git checkout master")
|
||||||
|
print(os.getcwd())
|
||||||
|
|
||||||
#updates 1 class, does not switch to master
|
#updates 1 class, does not switch to master
|
||||||
def updateClass(self, course):
|
def updateClass(self, course):
|
||||||
|
@ -222,14 +223,14 @@ class Student:
|
||||||
os.system(url)
|
os.system(url)
|
||||||
|
|
||||||
cdir = os.getcwd()
|
cdir = os.getcwd()
|
||||||
# path1 = self.username + "/" + self.username
|
path1 = self.username + "/" + self.username
|
||||||
# path2 = self.username
|
path2 = self.username
|
||||||
# if(os.path.isdir(path1)):
|
if(os.path.isdir(path1)):
|
||||||
# os.chdir(path1)
|
os.chdir(path1)
|
||||||
# else:
|
else:
|
||||||
# os.chdir(self.username)
|
os.chdir(self.username)
|
||||||
# command("git clone " + self.repo)
|
command("git clone " + self.repo)
|
||||||
# os.chdir(self.username)
|
os.chdir(self.username)
|
||||||
|
|
||||||
#push to git, start at master
|
#push to git, start at master
|
||||||
os.chdir(self.username)
|
os.chdir(self.username)
|
||||||
|
@ -277,6 +278,7 @@ class Student:
|
||||||
data={
|
data={
|
||||||
'user':self.user,
|
'user':self.user,
|
||||||
'added_to':self.snew,
|
'added_to':self.snew,
|
||||||
|
'classes':self.sclass
|
||||||
}
|
}
|
||||||
print(self.url)
|
print(self.url)
|
||||||
print(patchDB(data, self.url))
|
print(patchDB(data, self.url))
|
||||||
|
@ -366,15 +368,14 @@ class Student:
|
||||||
command('git checkout master')
|
command('git checkout master')
|
||||||
os.chdir(cdir)
|
os.chdir(cdir)
|
||||||
|
|
||||||
# data = getStudent("2022rkhondak")
|
data = getStudent("2022rkhondak")
|
||||||
# s = Student(data)
|
s = Student(data)
|
||||||
# #s.viewClass("APLit_eharris1")
|
#s.viewClass("APLit_eharris1")
|
||||||
# #s.updateClass("APLit_eharris1")
|
s.addClass("APLit_eharris1")
|
||||||
# #s.update()
|
# #s.update()
|
||||||
# s.exitCLI()
|
# s.exitCLI()
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
print("noooo")
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -332,24 +332,23 @@ class Teacher:
|
||||||
command('git push -u origin ' + cname)
|
command('git push -u origin ' + cname)
|
||||||
os.chdir(cdir)
|
os.chdir(cdir)
|
||||||
|
|
||||||
if(course['confirmed']==""):
|
if(course['confirmed']==[]):
|
||||||
course['confirmed']=student['ion_user']
|
course['confirmed']=student['ion_user']
|
||||||
else:
|
else:
|
||||||
course['confirmed']=course['confirmed']+ "," + student['ion_user']
|
course['confirmed'].append(student['ion_user'])
|
||||||
|
|
||||||
#only 1 pereson on confirmeed
|
#only 1 pereson on confirmeed
|
||||||
if(("," in course['unconfirmed']) == False):
|
if(len(course['unconfirmed']) == 1):
|
||||||
course['unconfirmed']=""
|
course['unconfirmed']=[]
|
||||||
#mutiple
|
#mutiple
|
||||||
else:
|
else:
|
||||||
course['unconfirmed']= course['unconfirmed'].replace("," + student['ion_user'], "")
|
course['unconfirmed'].remove(student['ion_user'])
|
||||||
course['unconfirmed']= course['unconfirmed'].replace(student['ion_user']+",", "")
|
|
||||||
|
|
||||||
cinfo = {
|
cinfo = {
|
||||||
"confirmed": course["confirmed"],
|
"confirmed": course["confirmed"],
|
||||||
"unconfirmed": course['unconfirmed']
|
"unconfirmed": course['unconfirmed']
|
||||||
}
|
}
|
||||||
print(patchDB(cinfo, "http://localhost:8000/api/classes/" + course['name'] + "/"))
|
print(putDB(course, "http://localhost:8000/api/classes/" + course['name'] + "/"))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
#goes through list of studennts, tries to add, then request, return unconfirmed students
|
#goes through list of studennts, tries to add, then request, return unconfirmed students
|
||||||
|
@ -436,15 +435,12 @@ class Teacher:
|
||||||
'due_date':due
|
'due_date':due
|
||||||
}
|
}
|
||||||
postDB(ass, 'http://127.0.0.1:8000/api/assignments/')
|
postDB(ass, 'http://127.0.0.1:8000/api/assignments/')
|
||||||
if(course['assignments'] == ""):
|
course['assignments'].append(aname)
|
||||||
course['assignments'] = ass
|
|
||||||
else:
|
|
||||||
course['assignments'] = course['assignments'].append(ass)
|
|
||||||
|
|
||||||
cinfo = {
|
cinfo = {
|
||||||
"assignments": course['assignments'],
|
"assignments": course['assignments'],
|
||||||
}
|
}
|
||||||
patchDB(cinfo, "http://127.0.0.1:8000/api/classes/" + course['name'] + "/")
|
print(patchDB(cinfo, "http://127.0.0.1:8000/api/classes/" + course['name'] + "/"))
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
print("Assignment already addedd")
|
print("Assignment already addedd")
|
||||||
|
@ -606,7 +602,7 @@ t = Teacher(data)
|
||||||
#ar = ['2022rkhondak','2022inafi','2023rumareti']
|
#ar = ['2022rkhondak','2022inafi','2023rumareti']
|
||||||
#extra = t.reqAddStudentList(ar, "APLit_eharris1")
|
#extra = t.reqAddStudentList(ar, "APLit_eharris1")
|
||||||
#print(extra)
|
#print(extra)
|
||||||
t.reqStudent('2022rkhondak', 'APLit_eharris1')
|
#t.addStudent('2022rkhondak', 'APLit_eharris1')
|
||||||
# t.getChanges('2022rkhondak','APLit_eharris1', 10)
|
# t.getChanges('2022rkhondak','APLit_eharris1', 10)
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -1,62 +1,81 @@
|
||||||
appdirs==1.4.3
|
appdirs==1.4.3
|
||||||
asgiref==3.2.7
|
cachecontrol==0.12.6
|
||||||
astroid==2.4.2
|
|
||||||
CacheControl==0.12.6
|
|
||||||
certifi==2020.4.5.1
|
|
||||||
chardet==3.0.4
|
|
||||||
click==7.1.2
|
click==7.1.2
|
||||||
colorama==0.4.3
|
colorama==0.4.3
|
||||||
contextlib2==0.6.0
|
contextlib2==0.6.0
|
||||||
distlib==0.3.0
|
distlib==0.3.0
|
||||||
distro==1.4.0
|
distro==1.4.0
|
||||||
Django==3.0.7
|
|
||||||
django-cors-middleware==1.5.0
|
django-cors-middleware==1.5.0
|
||||||
django-crispy-forms==1.9.1
|
django-crispy-forms==1.9.1
|
||||||
|
django-forms-bootstrap==3.1.0
|
||||||
django-oauth-toolkit==1.3.2
|
django-oauth-toolkit==1.3.2
|
||||||
|
django-request-token==0.10.1
|
||||||
djangorestframework==3.11.0
|
djangorestframework==3.11.0
|
||||||
greenlet==0.4.16
|
hashids==1.2.0
|
||||||
html5lib==1.0.1
|
html5lib==1.0.1
|
||||||
idna==2.9
|
|
||||||
isort==4.3.21
|
|
||||||
lazy-object-proxy==1.4.3
|
|
||||||
mccabe==0.6.1
|
|
||||||
meson==0.53.2
|
meson==0.53.2
|
||||||
msgpack==0.6.2
|
|
||||||
numpy==1.18.5
|
numpy==1.18.5
|
||||||
oauthlib==3.1.0
|
|
||||||
ordered-set==3.1.1
|
ordered-set==3.1.1
|
||||||
packaging==20.1
|
|
||||||
pep517==0.8.1
|
pep517==0.8.1
|
||||||
Pillow==7.1.2
|
pip-chill==1.0.0
|
||||||
progress==1.5
|
progress==1.5
|
||||||
prompt-toolkit==1.0.14
|
|
||||||
pulsemixer==1.5.0
|
pulsemixer==1.5.0
|
||||||
pycairo==1.19.1
|
pycairo==1.19.1
|
||||||
pyclipper==1.1.0.post3
|
pyclipper==1.1.0.post3
|
||||||
Pygments==2.6.1
|
|
||||||
PyGObject==3.34.0
|
|
||||||
pyinotify==0.9.6
|
pyinotify==0.9.6
|
||||||
PyInquirer==1.0.3
|
pyinquirer==1.0.3
|
||||||
pylint==2.5.3
|
pylint==2.5.3
|
||||||
pynvim==0.4.1
|
pynvim==0.4.1
|
||||||
pyparsing==2.4.6
|
|
||||||
pyperclip==1.8.0
|
pyperclip==1.8.0
|
||||||
pytoml==0.1.21
|
pytoml==0.1.21
|
||||||
pytz==2020.1
|
requests-oauth==0.4.1
|
||||||
pywal==3.3.0
|
|
||||||
regex==2020.5.14
|
|
||||||
requests==2.23.0
|
|
||||||
requests-oauthlib==1.3.0
|
requests-oauthlib==1.3.0
|
||||||
retrying==1.3.3
|
retrying==1.3.3
|
||||||
selenium==3.141.0
|
selenium==3.141.0
|
||||||
six==1.15.0
|
sphinx==3.1.1
|
||||||
sqlparse==0.3.1
|
werkzeug==1.0.1
|
||||||
toml==0.10.0
|
|
||||||
urllib3==1.25.9
|
|
||||||
wcwidth==0.2.3
|
|
||||||
webencodings==0.5.1
|
|
||||||
Werkzeug==1.0.1
|
|
||||||
wpgtk==6.1.3
|
wpgtk==6.1.3
|
||||||
wrapt==1.12.1
|
|
||||||
yapf==0.30.0
|
yapf==0.30.0
|
||||||
|
# alabaster==0.7.12 # Installed as dependency for sphinx
|
||||||
|
# asgiref==3.2.7 # Installed as dependency for django
|
||||||
|
# astroid==2.4.2 # Installed as dependency for pylint
|
||||||
|
# babel==2.8.0 # Installed as dependency for sphinx
|
||||||
|
# certifi==2020.4.5.1 # Installed as dependency for requests
|
||||||
|
# chardet==3.0.4 # Installed as dependency for requests
|
||||||
|
# django==3.0.7 # Installed as dependency for django-request-token, djangorestframework, django-oauth-toolkit
|
||||||
|
# docutils==0.16 # Installed as dependency for sphinx
|
||||||
|
# greenlet==0.4.16 # Installed as dependency for pynvim
|
||||||
|
# idna==2.9 # Installed as dependency for requests
|
||||||
|
# imagesize==1.2.0 # Installed as dependency for sphinx
|
||||||
|
# isort==4.3.21 # Installed as dependency for pylint
|
||||||
|
# jinja2==2.11.2 # Installed as dependency for sphinx
|
||||||
|
# lazy-object-proxy==1.4.3 # Installed as dependency for astroid
|
||||||
|
# markupsafe==1.1.1 # Installed as dependency for jinja2
|
||||||
|
# mccabe==0.6.1 # Installed as dependency for pylint
|
||||||
|
# msgpack==0.6.2 # Installed as dependency for pynvim, cachecontrol
|
||||||
|
# oauthlib==3.1.0 # Installed as dependency for requests-oauthlib, django-oauth-toolkit
|
||||||
|
# packaging==20.1 # Installed as dependency for sphinx
|
||||||
|
# pillow==7.1.2 # Installed as dependency for wpgtk
|
||||||
|
# prompt-toolkit==1.0.14 # Installed as dependency for pyinquirer
|
||||||
|
# psycopg2-binary==2.8.5 # Installed as dependency for django-request-token
|
||||||
|
# pygments==2.6.1 # Installed as dependency for sphinx, pyinquirer
|
||||||
|
# pyjwt==1.7.1 # Installed as dependency for django-request-token
|
||||||
|
# pyparsing==2.4.6 # Installed as dependency for packaging
|
||||||
|
# pytz==2020.1 # Installed as dependency for django, babel
|
||||||
|
# pywal==3.3.0 # Installed as dependency for wpgtk
|
||||||
|
# regex==2020.5.14 # Installed as dependency for pyinquirer
|
||||||
|
# requests==2.23.0 # Installed as dependency for cachecontrol, requests-oauth, django-oauth-toolkit, sphinx, requests-oauthlib
|
||||||
|
# six==1.15.0 # Installed as dependency for astroid, prompt-toolkit, html5lib, retrying, packaging
|
||||||
|
# snowballstemmer==2.0.0 # Installed as dependency for sphinx
|
||||||
|
# sphinxcontrib-applehelp==1.0.2 # Installed as dependency for sphinx
|
||||||
|
# sphinxcontrib-devhelp==1.0.2 # Installed as dependency for sphinx
|
||||||
|
# sphinxcontrib-htmlhelp==1.0.3 # Installed as dependency for sphinx
|
||||||
|
# sphinxcontrib-jsmath==1.0.1 # Installed as dependency for sphinx
|
||||||
|
# sphinxcontrib-qthelp==1.0.3 # Installed as dependency for sphinx
|
||||||
|
# sphinxcontrib-serializinghtml==1.1.4 # Installed as dependency for sphinx
|
||||||
|
# sqlparse==0.3.1 # Installed as dependency for django, django-request-token
|
||||||
|
# toml==0.10.0 # Installed as dependency for pylint, pep517
|
||||||
|
# urllib3==1.25.9 # Installed as dependency for selenium, requests
|
||||||
|
# wcwidth==0.2.3 # Installed as dependency for prompt-toolkit
|
||||||
|
# webencodings==0.5.1 # Installed as dependency for html5lib
|
||||||
|
# wrapt==1.12.1 # Installed as dependency for astroid
|
||||||
|
|
Loading…
Reference in New Issue
Block a user