-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathskoolos.html
More file actions
112 lines (108 loc) · 7.81 KB
/
skoolos.html
File metadata and controls
112 lines (108 loc) · 7.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module skoolos</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>skoolos</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/nkenschaft/Sysadmin/skoolos/skoolos.py">/home/nkenschaft/Sysadmin/skoolos/skoolos.py</a></font></td></tr></table>
<p><tt>The main program file for SkoolOS</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="argparse.html">argparse</a><br>
<a href="datetime.html">datetime</a><br>
<a href="http.html">http</a><br>
</td><td width="25%" valign=top><a href="json.html">json</a><br>
<a href="os.html">os</a><br>
<a href="pprint.html">pprint</a><br>
</td><td width="25%" valign=top><a href="requests.html">requests</a><br>
<a href="socketserver.html">socketserver</a><br>
<a href="sys.html">sys</a><br>
</td><td width="25%" valign=top><a href="time.html">time</a><br>
<a href="webbrowser.html">webbrowser</a><br>
<a href="selenium.webdriver.html">selenium.webdriver</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-addAssignmentTeacher"><strong>addAssignmentTeacher</strong></a>(teacher, course)</dt></dl>
<dl><dt><a name="-addStudentsTeacher"><strong>addStudentsTeacher</strong></a>(teacher, course)</dt></dl>
<dl><dt><a name="-authenticate"><strong>authenticate</strong></a>()</dt><dd><tt>Authenticates the user via Ion OAuth</tt></dd></dl>
<dl><dt><a name="-chooseClassStudent"><strong>chooseClassStudent</strong></a>(student)</dt><dd><tt>Chooses a class for a student to view and work on<br>
param student: a student<br>
return: a course prompt</tt></dd></dl>
<dl><dt><a name="-chooseGeneralTeacher"><strong>chooseGeneralTeacher</strong></a>(teacher)</dt></dl>
<dl><dt><a name="-classOptionsStudent"><strong>classOptionsStudent</strong></a>(student, course)</dt><dd><tt>Allows students to choose what they want to do related to a class<br>
The student can save, exit, or go back<br>
param student: a student<br>
param course: a course<br>
return: True if exiting, False if going back</tt></dd></dl>
<dl><dt><a name="-classOptionsTeacher"><strong>classOptionsTeacher</strong></a>(teacher, course)</dt></dl>
<dl><dt><a name="-create_server"><strong>create_server</strong></a>()</dt><dd><tt>Creates a simple HTTP server for creating api requests from the CLI</tt></dd></dl>
<dl><dt><a name="-delDB"><strong>delDB</strong></a>(USER, PWD, url)</dt><dd><tt>Sends a DELETE request to url<br>
param USER: username<br>
param PWD: password<br>
param url: URL for request<br>
return: json request response</tt></dd></dl>
<dl><dt><a name="-getDB"><strong>getDB</strong></a>(USER, PWD, url)</dt><dd><tt>Sends a GET request to url<br>
param USER: username<br>
param PWD: password<br>
param url: URL for request<br>
return: json request response</tt></dd></dl>
<dl><dt><a name="-getUser"><strong>getUser</strong></a>(ion_user, password, utype)</dt><dd><tt>Returns user information<br>
param ion_user: user<br>
param password: user's password<br>
param utype: type of user (student or teacher<br>
return: api user information</tt></dd></dl>
<dl><dt><a name="-main"><strong>main</strong></a>()</dt><dd><tt>The Command Line Interface (CLI) for SkoolOS<br>
Serves to allow both teachers and students to access the majority of the features of SkoolOS</tt></dd></dl>
<dl><dt><a name="-makeClassTeacher"><strong>makeClassTeacher</strong></a>(teacher)</dt></dl>
<dl><dt><a name="-makePass"><strong>makePass</strong></a>()</dt><dd><tt>Prompts the user to create a password<br>
return: the password</tt></dd></dl>
<dl><dt><a name="-patchDB"><strong>patchDB</strong></a>(USER, PWD, url, data)</dt><dd><tt>Sends a PATCH request to url<br>
param USER: username<br>
param PWD: password<br>
param url: URL for request<br>
param data: data to request<br>
return: json request response</tt></dd></dl>
<dl><dt><a name="-postDB"><strong>postDB</strong></a>(USER, PWD, url, data)</dt><dd><tt>Sends a POST request to url<br>
param USER: username<br>
param PWD: password<br>
param url: URL for request<br>
param data: data to request<br>
return: json request response</tt></dd></dl>
<dl><dt><a name="-putDB"><strong>putDB</strong></a>(USER, PWD, url, data)</dt><dd><tt>Sends a PUT request to url<br>
param USER: username<br>
param PWD: password<br>
param url: URL for request<br>
param data: data to request<br>
return: json request response</tt></dd></dl>
<dl><dt><a name="-studentCLI"><strong>studentCLI</strong></a>(user, password)</dt><dd><tt>The CLI for students to access<br>
param user: student username<br>
param password: student password</tt></dd></dl>
<dl><dt><a name="-teacherCLI"><strong>teacherCLI</strong></a>(user, password)</dt><dd><tt>The CLI for teachers to access<br>
param user: teachers username<br>
param password: teachers password</tt></dd></dl>
<dl><dt><a name="-viewStudentsTeacher"><strong>viewStudentsTeacher</strong></a>(teacher, course)</dt></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>PWD</strong> = ''<br>
<strong>USER</strong> = ''<br>
<strong>client_id</strong> = 'QeZPBSKqdvWFfBv1VYTSv9iFGz5T9pVJtNUjbEr6'<br>
<strong>client_secret</strong> = '0Wl3hAIGY9SvYOqTOLUiLNYa4OlCgZYdno9ZbcgCT7RGQ8x2...mOADHIv5fHxaa7GqFNtQr11HX9ySTw3DscKsphCVi5P71mlGY'<br>
<strong>redirect_uri</strong> = 'http://localhost:8000/callback/'<br>
<strong>scope</strong> = ['read']<br>
<strong>token_url</strong> = 'https://ion.tjhsst.edu/oauth/token/'</td></tr></table>
</body></html>