skoolos
index
/home/nkenschaft/Sysadmin/skoolos/skoolos.py

The main program file for SkoolOS

 
Modules
       
argparse
datetime
http
json
os
pprint
requests
socketserver
sys
time
webbrowser
selenium.webdriver

 
Functions
       
addAssignmentTeacher(teacher, course)
addStudentsTeacher(teacher, course)
authenticate()
Authenticates the user via Ion OAuth
chooseClassStudent(student)
Chooses a class for a student to view and work on
param student: a student
return: a course prompt
chooseGeneralTeacher(teacher)
classOptionsStudent(student, course)
Allows students to choose what they want to do related to a class
The student can save, exit, or go back
param student: a student
param course: a course
return: True if exiting, False if going back
classOptionsTeacher(teacher, course)
create_server()
Creates a simple HTTP server for creating api requests from the CLI
delDB(USER, PWD, url)
Sends a DELETE request to url
param USER: username
param PWD: password
param url: URL for request
return: json request response
getDB(USER, PWD, url)
Sends a GET request to url
param USER: username
param PWD: password
param url: URL for request
return: json request response
getUser(ion_user, password, utype)
Returns user information
param ion_user: user
param password: user's password
param utype: type of user (student or teacher
return: api user information
main()
The Command Line Interface (CLI) for SkoolOS
Serves to allow both teachers and students to access the majority of the features of SkoolOS
makeClassTeacher(teacher)
makePass()
Prompts the user to create a password
return: the password
patchDB(USER, PWD, url, data)
Sends a PATCH request to url
param USER: username
param PWD: password
param url: URL for request
param data: data to request
return: json request response
postDB(USER, PWD, url, data)
Sends a POST request to url
param USER: username
param PWD: password
param url: URL for request
param data: data to request
return: json request response
putDB(USER, PWD, url, data)
Sends a PUT request to url
param USER: username
param PWD: password
param url: URL for request
param data: data to request
return: json request response
studentCLI(user, password)
The CLI for students to access
param user: student username
param password: student password
teacherCLI(user, password)
The CLI for teachers to access
param user: teachers username
param password: teachers password
viewStudentsTeacher(teacher, course)

 
Data
        PWD = ''
USER = ''
client_id = 'QeZPBSKqdvWFfBv1VYTSv9iFGz5T9pVJtNUjbEr6'
client_secret = '0Wl3hAIGY9SvYOqTOLUiLNYa4OlCgZYdno9ZbcgCT7RGQ8x2...mOADHIv5fHxaa7GqFNtQr11HX9ySTw3DscKsphCVi5P71mlGY'
redirect_uri = 'http://localhost:8000/callback/'
scope = ['read']
token_url = 'https://ion.tjhsst.edu/oauth/token/'