Merge pull request #21 from Rushilwiz/development

Development
This commit is contained in:
Rushil Umaretiya 2020-06-16 23:59:32 -04:00 committed by GitHub
commit ecf81566e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 417021 additions and 177660 deletions

View File

@ -1 +0,0 @@
{"username": "eharris1", "is_student": false, "password": "hackgroup1"}

View File

@ -1 +0,0 @@
{"username": "2022rkhondak", "grade": 9, "is_student": true, "password": "hackgroup1"}

View File

@ -1 +0,0 @@
{"username": "rushilwiz", "grade": 69, "is_student": true, "password": "a"}

View File

@ -1 +0,0 @@
{"username": "sstern1", "is_student": false, "password": "Riya2011"}

View File

@ -569,7 +569,7 @@ class Teacher:
'due_date': str(due),
'owner':self.id
}
postDB(self.username, self.password, ass, 'http://127.0.0.1:8000/api/assignments/')
print(postDB(self.username, self.password, ass, 'http://127.0.0.1:8000/api/assignments/'))
course['assignments'].append(oname)
cinfo = {

View File

@ -1,55 +0,0 @@
Start time: Tuesday, June 16, 2020 22:18:48
Event: Opened file
Event Path: /home/nkenschaft/Sysadmin/skoolos/bgservice/run.py
Timestamp: Tuesday, June 16, 2020 22:18:48
Event: Created file
Event Path: /home/nkenschaft/Sysadmin/skoolos/bgservice.run.html
Timestamp: Tuesday, June 16, 2020 22:18:48
Event: Opened file
Event Path: /home/nkenschaft/Sysadmin/skoolos/bgservice.run.html
Timestamp: Tuesday, June 16, 2020 22:18:48
wrote bgservice.run.html
Event: Wrote to a file
Event Path: /home/nkenschaft/Sysadmin/skoolos/bgservice.run.html
Timestamp: Tuesday, June 16, 2020 22:18:48
Event: Opened file
Event Path: /home/nkenschaft/Sysadmin/skoolos/bgservice/__pycache__/test.cpython-38.pyc
Timestamp: Tuesday, June 16, 2020 22:18:48
Event: Opened file
Event Path: /home/nkenschaft/Sysadmin/skoolos/bgservice/test.py
Timestamp: Tuesday, June 16, 2020 22:18:48
Event: Created file
Event Path: /home/nkenschaft/Sysadmin/skoolos/bgservice/__pycache__/test.cpython-38.pyc.139630150929712
Timestamp: Tuesday, June 16, 2020 22:18:48
Event: Opened file
Event Path: /home/nkenschaft/Sysadmin/skoolos/bgservice/__pycache__/test.cpython-38.pyc.139630150929712
Timestamp: Tuesday, June 16, 2020 22:18:48
Event: Wrote to a file
Event Path: /home/nkenschaft/Sysadmin/skoolos/bgservice/__pycache__/test.cpython-38.pyc.139630150929712
Timestamp: Tuesday, June 16, 2020 22:18:48
Event: Moved a file out
Event Path: /home/nkenschaft/Sysadmin/skoolos/bgservice/__pycache__/test.cpython-38.pyc.139630150929712
Timestamp: Tuesday, June 16, 2020 22:18:48
Event: Moved a file in
Event Path: /home/nkenschaft/Sysadmin/skoolos/bgservice/__pycache__/test.cpython-38.pyc
Timestamp: Tuesday, June 16, 2020 22:18:48
Event: Created file
Event Path: /home/nkenschaft/Sysadmin/skoolos/SkoolOS/logs/skoolos_06162020-221848
Timestamp: Tuesday, June 16, 2020 22:18:48
Event: Opened file
Event Path: /home/nkenschaft/Sysadmin/skoolos/SkoolOS/logs/skoolos_06162020-221848
Timestamp: Tuesday, June 16, 2020 22:18:48

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

416690
SkoolOS/logs/skooloslog Normal file

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@ class AssignmentSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Assignment
# fields = ['url','name', 'due_date', 'path' , "Class","teacher",'owner']
fields = ['name', 'due_date', 'path' ,"teacher",'owner']
fields = ['name', 'due_date', 'path' ,'teacher','owner']
class ClassSerializer(serializers.ModelSerializer):
# assignments = AssignmentSerializer(many=True, read_only=True,allow_null=True)

View File

@ -1,187 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module bgservice.bgservice</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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="bgservice.html"><font color="#ffffff">bgservice</font></a>.bgservice</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/bgservice/bgservice.py">/home/nkenschaft/Sysadmin/skoolos/bgservice/bgservice.py</a></font></td></tr></table>
<p><tt>A&nbsp;simple&nbsp;background&nbsp;service&nbsp;to&nbsp;log&nbsp;events&nbsp;in&nbsp;a&nbsp;directory,<br>
check&nbsp;for&nbsp;git&nbsp;commands&nbsp;in&nbsp;bash/zsh&nbsp;history,<br>
and&nbsp;check&nbsp;for&nbsp;non-whitelisted&nbsp;files&nbsp;in&nbsp;the&nbsp;watched&nbsp;directory.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="bgservice.checker.html">bgservice.checker</a><br>
<a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="pyinotify.html">pyinotify</a><br>
<a href="sys.html">sys</a><br>
</td><td width="25%" valign=top><a href="time.html">time</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="pyinotify.html#ProcessEvent">pyinotify.ProcessEvent</a>(<a href="pyinotify.html#_ProcessEvent">pyinotify._ProcessEvent</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="bgservice.bgservice.html#EventHandler">EventHandler</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="EventHandler">class <strong>EventHandler</strong></a>(<a href="pyinotify.html#ProcessEvent">pyinotify.ProcessEvent</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#EventHandler">EventHandler</a>(pevent=None,&nbsp;**kargs)<br>
&nbsp;<br>
Custom&nbsp;event&nbsp;handler&nbsp;for&nbsp;watching&nbsp;a&nbsp;SkoolOS&nbsp;work&nbsp;directory<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="bgservice.bgservice.html#EventHandler">EventHandler</a></dd>
<dd><a href="pyinotify.html#ProcessEvent">pyinotify.ProcessEvent</a></dd>
<dd><a href="pyinotify.html#_ProcessEvent">pyinotify._ProcessEvent</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="EventHandler-process_IN_CLOSE_WRITE"><strong>process_IN_CLOSE_WRITE</strong></a>(self, event)</dt><dd><tt>Generates&nbsp;an&nbsp;output&nbsp;to&nbsp;record&nbsp;for&nbsp;IN_CLOSE_WRITE&nbsp;events<br>
param&nbsp;event:&nbsp;event&nbsp;automatically&nbsp;passed&nbsp;to&nbsp;function<br>
return:&nbsp;none</tt></dd></dl>
<dl><dt><a name="EventHandler-process_IN_CREATE"><strong>process_IN_CREATE</strong></a>(self, event)</dt><dd><tt>Generates&nbsp;an&nbsp;output&nbsp;to&nbsp;record&nbsp;for&nbsp;IN_CREATE&nbsp;events<br>
param&nbsp;event:&nbsp;event&nbsp;automatically&nbsp;passed&nbsp;to&nbsp;function<br>
return:&nbsp;none</tt></dd></dl>
<dl><dt><a name="EventHandler-process_IN_DELETE"><strong>process_IN_DELETE</strong></a>(self, event)</dt><dd><tt>Generates&nbsp;an&nbsp;output&nbsp;to&nbsp;record&nbsp;for&nbsp;IN_DELETE&nbsp;events<br>
param&nbsp;event:&nbsp;event&nbsp;automatically&nbsp;passed&nbsp;to&nbsp;function<br>
return:&nbsp;none</tt></dd></dl>
<dl><dt><a name="EventHandler-process_IN_MOVED_FROM"><strong>process_IN_MOVED_FROM</strong></a>(self, event)</dt><dd><tt>Generates&nbsp;an&nbsp;output&nbsp;to&nbsp;record&nbsp;for&nbsp;IN_MOVED_FROM&nbsp;events<br>
param&nbsp;event:&nbsp;event&nbsp;automatically&nbsp;passed&nbsp;to&nbsp;function<br>
return:&nbsp;none</tt></dd></dl>
<dl><dt><a name="EventHandler-process_IN_MOVED_TO"><strong>process_IN_MOVED_TO</strong></a>(self, event)</dt><dd><tt>Generates&nbsp;an&nbsp;output&nbsp;to&nbsp;record&nbsp;for&nbsp;IN_MOVED_TO&nbsp;events<br>
param&nbsp;event:&nbsp;event&nbsp;automatically&nbsp;passed&nbsp;to&nbsp;function<br>
return:&nbsp;none</tt></dd></dl>
<dl><dt><a name="EventHandler-process_IN_OPEN"><strong>process_IN_OPEN</strong></a>(self, event)</dt><dd><tt>Generates&nbsp;an&nbsp;output&nbsp;to&nbsp;record&nbsp;for&nbsp;IN_OPEN&nbsp;events<br>
param&nbsp;event:&nbsp;event&nbsp;automatically&nbsp;passed&nbsp;to&nbsp;function<br>
return:&nbsp;none</tt></dd></dl>
<hr>
Methods inherited from <a href="pyinotify.html#ProcessEvent">pyinotify.ProcessEvent</a>:<br>
<dl><dt><a name="EventHandler-__call__"><strong>__call__</strong></a>(self, event)</dt><dd><tt>To&nbsp;behave&nbsp;like&nbsp;a&nbsp;functor&nbsp;the&nbsp;object&nbsp;must&nbsp;be&nbsp;callable.<br>
This&nbsp;method&nbsp;is&nbsp;a&nbsp;dispatch&nbsp;method.&nbsp;Its&nbsp;lookup&nbsp;order&nbsp;is:<br>
&nbsp;&nbsp;1.&nbsp;process_MASKNAME&nbsp;method<br>
&nbsp;&nbsp;2.&nbsp;process_FAMILY_NAME&nbsp;method<br>
&nbsp;&nbsp;3.&nbsp;otherwise&nbsp;calls&nbsp;process_default<br>
&nbsp;<br>
@param&nbsp;event:&nbsp;Event&nbsp;to&nbsp;be&nbsp;processed.<br>
@type&nbsp;event:&nbsp;Event&nbsp;object<br>
@return:&nbsp;By&nbsp;convention&nbsp;when&nbsp;used&nbsp;from&nbsp;the&nbsp;<a href="pyinotify.html#ProcessEvent">ProcessEvent</a>&nbsp;class:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;Returning&nbsp;False&nbsp;or&nbsp;None&nbsp;(default&nbsp;value)&nbsp;means&nbsp;keep&nbsp;on<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;executing&nbsp;next&nbsp;chained&nbsp;functors&nbsp;(see&nbsp;chain.py&nbsp;example).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;Returning&nbsp;True&nbsp;instead&nbsp;means&nbsp;do&nbsp;not&nbsp;execute&nbsp;next<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;processing&nbsp;functions.<br>
@rtype:&nbsp;bool<br>
@raise&nbsp;ProcessEventError:&nbsp;Event&nbsp;object&nbsp;undispatchable,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unknown&nbsp;event.</tt></dd></dl>
<dl><dt><a name="EventHandler-__init__"><strong>__init__</strong></a>(self, pevent=None, **kargs)</dt><dd><tt>Enable&nbsp;chaining&nbsp;of&nbsp;<a href="pyinotify.html#ProcessEvent">ProcessEvent</a>&nbsp;instances.<br>
&nbsp;<br>
@param&nbsp;pevent:&nbsp;Optional&nbsp;callable&nbsp;object,&nbsp;will&nbsp;be&nbsp;called&nbsp;on&nbsp;event<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;processing&nbsp;(before&nbsp;self).<br>
@type&nbsp;pevent:&nbsp;callable<br>
@param&nbsp;kargs:&nbsp;This&nbsp;constructor&nbsp;is&nbsp;implemented&nbsp;as&nbsp;a&nbsp;template&nbsp;method<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delegating&nbsp;its&nbsp;optionals&nbsp;keyworded&nbsp;arguments&nbsp;to&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;method&nbsp;<a href="#EventHandler-my_init">my_init</a>().<br>
@type&nbsp;kargs:&nbsp;dict</tt></dd></dl>
<dl><dt><a name="EventHandler-my_init"><strong>my_init</strong></a>(self, **kargs)</dt><dd><tt>This&nbsp;method&nbsp;is&nbsp;called&nbsp;from&nbsp;<a href="pyinotify.html#ProcessEvent">ProcessEvent</a>.<a href="#EventHandler-__init__">__init__</a>().&nbsp;This&nbsp;method&nbsp;is<br>
empty&nbsp;here&nbsp;and&nbsp;must&nbsp;be&nbsp;redefined&nbsp;to&nbsp;be&nbsp;useful.&nbsp;In&nbsp;effect,&nbsp;if&nbsp;you<br>
need&nbsp;to&nbsp;specifically&nbsp;initialize&nbsp;your&nbsp;subclass'&nbsp;instance&nbsp;then&nbsp;you<br>
just&nbsp;have&nbsp;to&nbsp;override&nbsp;this&nbsp;method&nbsp;in&nbsp;your&nbsp;subclass.&nbsp;Then&nbsp;all&nbsp;the<br>
keyworded&nbsp;arguments&nbsp;passed&nbsp;to&nbsp;<a href="pyinotify.html#ProcessEvent">ProcessEvent</a>.<a href="#EventHandler-__init__">__init__</a>()&nbsp;will&nbsp;be<br>
transmitted&nbsp;as&nbsp;parameters&nbsp;to&nbsp;this&nbsp;method.&nbsp;Beware&nbsp;you&nbsp;MUST&nbsp;pass<br>
keyword&nbsp;arguments&nbsp;though.<br>
&nbsp;<br>
@param&nbsp;kargs:&nbsp;optional&nbsp;delegated&nbsp;arguments&nbsp;from&nbsp;<a href="#EventHandler-__init__">__init__</a>().<br>
@type&nbsp;kargs:&nbsp;dict</tt></dd></dl>
<dl><dt><a name="EventHandler-nested_pevent"><strong>nested_pevent</strong></a>(self)</dt></dl>
<dl><dt><a name="EventHandler-process_IN_Q_OVERFLOW"><strong>process_IN_Q_OVERFLOW</strong></a>(self, event)</dt><dd><tt>By&nbsp;default&nbsp;this&nbsp;method&nbsp;only&nbsp;reports&nbsp;warning&nbsp;messages,&nbsp;you&nbsp;can&nbsp;overredide<br>
it&nbsp;by&nbsp;subclassing&nbsp;<a href="pyinotify.html#ProcessEvent">ProcessEvent</a>&nbsp;and&nbsp;implement&nbsp;your&nbsp;own<br>
process_IN_Q_OVERFLOW&nbsp;method.&nbsp;The&nbsp;actions&nbsp;you&nbsp;can&nbsp;take&nbsp;on&nbsp;receiving&nbsp;this<br>
event&nbsp;is&nbsp;either&nbsp;to&nbsp;update&nbsp;the&nbsp;variable&nbsp;max_queued_events&nbsp;in&nbsp;order&nbsp;to<br>
handle&nbsp;more&nbsp;simultaneous&nbsp;events&nbsp;or&nbsp;to&nbsp;modify&nbsp;your&nbsp;code&nbsp;in&nbsp;order&nbsp;to<br>
accomplish&nbsp;a&nbsp;better&nbsp;filtering&nbsp;diminishing&nbsp;the&nbsp;number&nbsp;of&nbsp;raised&nbsp;events.<br>
Because&nbsp;this&nbsp;method&nbsp;is&nbsp;defined,&nbsp;IN_Q_OVERFLOW&nbsp;will&nbsp;never&nbsp;get<br>
transmitted&nbsp;as&nbsp;arguments&nbsp;to&nbsp;process_default&nbsp;calls.<br>
&nbsp;<br>
@param&nbsp;event:&nbsp;IN_Q_OVERFLOW&nbsp;event.<br>
@type&nbsp;event:&nbsp;dict</tt></dd></dl>
<dl><dt><a name="EventHandler-process_default"><strong>process_default</strong></a>(self, event)</dt><dd><tt>Default&nbsp;processing&nbsp;event&nbsp;method.&nbsp;By&nbsp;default&nbsp;does&nbsp;nothing.&nbsp;Subclass<br>
<a href="pyinotify.html#ProcessEvent">ProcessEvent</a>&nbsp;and&nbsp;redefine&nbsp;this&nbsp;method&nbsp;in&nbsp;order&nbsp;to&nbsp;modify&nbsp;its&nbsp;behavior.<br>
&nbsp;<br>
@param&nbsp;event:&nbsp;Event&nbsp;to&nbsp;be&nbsp;processed.&nbsp;Can&nbsp;be&nbsp;of&nbsp;any&nbsp;type&nbsp;of&nbsp;events&nbsp;but<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IN_Q_OVERFLOW&nbsp;events&nbsp;(see&nbsp;method&nbsp;process_IN_Q_OVERFLOW).<br>
@type&nbsp;event:&nbsp;Event&nbsp;instance</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="pyinotify.html#ProcessEvent">pyinotify.ProcessEvent</a>:<br>
<dl><dt><strong>pevent</strong> = None</dl>
<hr>
Methods inherited from <a href="pyinotify.html#_ProcessEvent">pyinotify._ProcessEvent</a>:<br>
<dl><dt><a name="EventHandler-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return&nbsp;repr(self).</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="pyinotify.html#_ProcessEvent">pyinotify._ProcessEvent</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-stop_watching"><strong>stop_watching</strong></a>()</dt><dd><tt>Stops&nbsp;the&nbsp;watch&nbsp;started&nbsp;by&nbsp;<a href="#-watch_dir">watch_dir</a>()<br>
return:&nbsp;none</tt></dd></dl>
<dl><dt><a name="-watch_dir"><strong>watch_dir</strong></a>(watched_dir='/home/nkenschaft', log_dir='SkoolOS/logs')</dt><dd><tt>Watches&nbsp;the&nbsp;specified&nbsp;directory&nbsp;for&nbsp;changes&nbsp;and&nbsp;outputs&nbsp;it&nbsp;in<br>
human&nbsp;readable&nbsp;format&nbsp;to&nbsp;a&nbsp;log&nbsp;file&nbsp;in&nbsp;the&nbsp;specified&nbsp;log&nbsp;directory.<br>
param&nbsp;watched_dir:&nbsp;directory&nbsp;to&nbsp;watch&nbsp;for&nbsp;changes<br>
param&nbsp;log_dir:&nbsp;directory&nbsp;to&nbsp;store&nbsp;log&nbsp;files<br>
return:&nbsp;none</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>DIR</strong> = None<br>
<strong>NOTIFIER</strong> = None<br>
<strong>START_TIME</strong> = None<br>
<strong>STDOUT</strong> = &lt;_io.TextIOWrapper name='&lt;stdout&gt;' mode='w' encoding='utf-8'&gt;</td></tr></table>
</body></html>

View File

@ -1,44 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module bgservice.checker</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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="bgservice.html"><font color="#ffffff">bgservice</font></a>.checker</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/bgservice/checker.py">/home/nkenschaft/Sysadmin/skoolos/bgservice/checker.py</a></font></td></tr></table>
<p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-file_check"><strong>file_check</strong></a>(dir_)</dt><dd><tt>Checks&nbsp;specified&nbsp;dir_&nbsp;for&nbsp;non-whitelisted&nbsp;files&nbsp;using&nbsp;<a href="#-verify_file">verify_file</a>()<br>
param&nbsp;dir_:&nbsp;directory&nbsp;to&nbsp;check<br>
return:&nbsp;list&nbsp;of&nbsp;suspicious&nbsp;files</tt></dd></dl>
<dl><dt><a name="-shell_check"><strong>shell_check</strong></a>()</dt><dd><tt>Check&nbsp;.bash_history&nbsp;and&nbsp;.histfile&nbsp;for&nbsp;git&nbsp;commands&nbsp;that&nbsp;could&nbsp;interfere&nbsp;with&nbsp;SkoolOS<br>
return:&nbsp;results&nbsp;of&nbsp;the&nbsp;check</tt></dd></dl>
<dl><dt><a name="-verify_file"><strong>verify_file</strong></a>(file_)</dt><dd><tt>Check&nbsp;if&nbsp;the&nbsp;file&nbsp;name&nbsp;has&nbsp;an&nbsp;extension&nbsp;in&nbsp;the&nbsp;list&nbsp;of&nbsp;whitelisted&nbsp;file&nbsp;exentsions<br>
param&nbsp;file_:&nbsp;path&nbsp;to&nbsp;file<br>
return:&nbsp;whether&nbsp;or&nbsp;not&nbsp;the&nbsp;file's&nbsp;extension&nbsp;is&nbsp;whitelisted</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>file_whitelist</strong> = ['.doc', '.docx', '.odt', '.pdf', '.rtf', '.tex', '.txt', '.wpd', '.3g2', '.3gp', '.avi', '.flv', '.h264', '.m4v', '.mkv', '.mov', '.mp4', '.mpg', '.mpeg', '.rm', ...]</td></tr></table>
</body></html>

View File

@ -1,23 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: package bgservice</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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>bgservice</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/bgservice/__init__.py">/home/nkenschaft/Sysadmin/skoolos/bgservice/__init__.py</a></font></td></tr></table>
<p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="bgservice.bgservice.html">bgservice</a><br>
</td><td width="25%" valign=top><a href="bgservice.checker.html">checker</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table>
</body></html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,10 +7,184 @@ import time
import sys
import os
import pyinotify
from . import checker
from pathlib import Path
from glob import glob
NOTIFIER = None
STDOUT = sys.stdout
DIR = None
START_TIME = None
def watch_dir(watched_dir=str(Path.home()), log_dir="SkoolOS/logs"):
"""
Watches the specified directory for changes and outputs it in
human readable format to a log file in the specified log directory.
param watched_dir: directory to watch for changes
param log_dir: directory to store log files
return: none
"""
global DIR
global START_TIME
global NOTIFIER
DIR = watched_dir
if not os.path.exists(log_dir):
os.makedirs(log_dir)
logfile_ = log_dir + "/skooloslog"
if os.path.isfile(logfile_):
os.remove(logfile_)
logfile = open(logfile_, 'w')
START_TIME = time.time()
wm = pyinotify.WatchManager()
mask = pyinotify.IN_CREATE | pyinotify.IN_CLOSE_WRITE | pyinotify.IN_DELETE | \
pyinotify.IN_MOVED_TO | pyinotify.IN_MOVED_FROM | pyinotify.IN_OPEN
NOTIFIER = pyinotify.ThreadedNotifier(wm, EventHandler())
NOTIFIER.start()
sys.stdout = open("/dev/null", 'w')
wm.add_watch(watched_dir, mask, rec=True)
time.sleep(1)
sys.stdout = logfile
print("Start time: " +
time.strftime("%A, %B %d, %Y %H:%M:%S", time.localtime()) + "\n")
def stop_watching():
"""
Stops the watch started by watch_dir()
return: none
"""
NOTIFIER.stop()
now = time.time()
print("End time: " +
time.strftime("%A, %B %d, %Y %H:%M:%S", time.localtime()))
print("\nTotal work time: " +
time.strftime("%H:%M:%S", time.gmtime(now - START_TIME)))
print("\n" + shell_check())
suspicious_files = file_check(DIR)
if suspicious_files != []:
print(
"\n\n--------------------------------------------------\n\n\n" +
"WARNING: One or more file did not have file extensions that are acceptable.\n"
+ "The paths to these files are listed below:\n")
print(*suspicious_files, sep='\n')
sys.stdout = STDOUT
file_whitelist = [
# text and document files
".doc",
".docx",
".odt",
".pdf",
".rtf",
".tex",
".txt",
".wpd",
# video files
".3g2",
".3gp",
".avi",
".flv",
".h264",
".m4v",
".mkv",
".mov",
".mp4",
".mpg",
".mpeg",
".rm",
".swf",
".vob",
".wmv",
# spreadsheet files
".ods",
".xls",
".xlsm",
".xlsx",
".csv",
# programming files
".c",
".class",
".cpp",
".cs",
".go",
".h",
".java",
".pl",
".sh",
".swift",
".vb",
# presentation files
".key",
".odp",
".pps",
".ppt",
".pptx",
# image files
".ai",
".bmp",
".gif",
".ico",
".jpeg",
".jpg",
".png",
".ps",
".psd",
".svg",
".tif",
".tiff",
]
def shell_check():
"""
Check .bash_history and .histfile for git commands that could interfere with SkoolOS
return: results of the check
"""
bash_history = [
line.strip()
for line in open(os.path.expanduser("~/.bash_history"), 'r')
]
zsh_history = [
line.strip() for line in open(os.path.expanduser("~/.histfile"), 'r')
]
suspicious_commands = []
for i in bash_history + zsh_history:
if "git" in i:
suspicious_commands.append(i)
if suspicious_commands:
return str(
len(suspicious_commands)
) + " suspicious commands found:\n" + "\n".join(suspicious_commands)
return "Nothing suspicious found in bash or zsh history."
def verify_file(file_):
"""
Check if the file name has an extension in the list of whitelisted file exentsions
param file_: path to file
return: whether or not the file's extension is whitelisted
"""
for ext in file_whitelist:
if len(file_) > len(ext):
if file_[len(file_) - len(ext):] == ext:
return True
return False
def file_check(dir_):
"""
Checks specified dir_ for non-whitelisted files using verify_file()
param dir_: directory to check
return: list of suspicious files
"""
files = glob(dir_ + "/**/*", recursive=True)
suspicious_files = []
for file_ in files:
if not verify_file(file_):
suspicious_files.append(file_)
return suspicious_files
class EventHandler(pyinotify.ProcessEvent):
"""
Custom event handler for watching a SkoolOS work directory
@ -113,63 +287,3 @@ class EventHandler(pyinotify.ProcessEvent):
time.strftime("%A, %B %d, %Y %H:%M:%S", time.localtime())
)
print(description)
NOTIFIER = None
STDOUT = sys.stdout
DIR = None
START_TIME = None
def watch_dir(watched_dir=str(Path.home()), log_dir="SkoolOS/logs"):
"""
Watches the specified directory for changes and outputs it in
human readable format to a log file in the specified log directory.
param watched_dir: directory to watch for changes
param log_dir: directory to store log files
return: none
"""
global DIR
global START_TIME
global NOTIFIER
DIR = watched_dir
if not os.path.exists(log_dir):
os.makedirs(log_dir)
logfile_ = log_dir + "/skooloslog"
if os.path.isfile(logfile_):
os.remove(logfile_)
logfile = open(logfile_, 'w')
START_TIME = time.time()
wm = pyinotify.WatchManager()
mask = pyinotify.IN_CREATE | pyinotify.IN_CLOSE_WRITE | pyinotify.IN_DELETE | \
pyinotify.IN_MOVED_TO | pyinotify.IN_MOVED_FROM | pyinotify.IN_OPEN
NOTIFIER = pyinotify.ThreadedNotifier(wm, EventHandler())
NOTIFIER.start()
sys.stdout = open("/dev/null", 'w')
wm.add_watch(watched_dir, mask, rec=True)
time.sleep(1)
sys.stdout = logfile
print("Start time: " +
time.strftime("%A, %B %d, %Y %H:%M:%S", time.localtime()) + "\n")
def stop_watching():
"""
Stops the watch started by watch_dir()
return: none
"""
NOTIFIER.stop()
now = time.time()
print("End time: " +
time.strftime("%A, %B %d, %Y %H:%M:%S", time.localtime()))
print("\nTotal work time: " +
time.strftime("%H:%M:%S", time.gmtime(now - START_TIME)))
print("\n" + checker.shell_check())
suspicious_files = checker.file_check(DIR)
if suspicious_files != []:
print(
"\n\n--------------------------------------------------\n\n\n" +
"WARNING: One or more file did not have file extensions that are acceptable.\n"
+ "The paths to these files are listed below:\n")
print(*suspicious_files, sep='\n')
sys.stdout = STDOUT

View File

@ -1,117 +0,0 @@
import os
from glob import glob
file_whitelist = [
# text and document files
".doc",
".docx",
".odt",
".pdf",
".rtf",
".tex",
".txt",
".wpd",
# video files
".3g2",
".3gp",
".avi",
".flv",
".h264",
".m4v",
".mkv",
".mov",
".mp4",
".mpg",
".mpeg",
".rm",
".swf",
".vob",
".wmv",
# spreadsheet files
".ods",
".xls",
".xlsm",
".xlsx",
".csv",
# programming files
".c",
".class",
".cpp",
".cs",
".go",
".h",
".java",
".pl",
".sh",
".swift",
".vb",
# presentation files
".key",
".odp",
".pps",
".ppt",
".pptx",
# image files
".ai",
".bmp",
".gif",
".ico",
".jpeg",
".jpg",
".png",
".ps",
".psd",
".svg",
".tif",
".tiff",
]
def shell_check():
"""
Check .bash_history and .histfile for git commands that could interfere with SkoolOS
return: results of the check
"""
bash_history = [
line.strip()
for line in open(os.path.expanduser("~/.bash_history"), 'r')
]
zsh_history = [
line.strip() for line in open(os.path.expanduser("~/.histfile"), 'r')
]
suspicious_commands = []
for i in bash_history + zsh_history:
if "git" in i:
suspicious_commands.append(i)
if suspicious_commands:
return str(
len(suspicious_commands)
) + " suspicious commands found:\n" + "\n".join(suspicious_commands)
return "Nothing suspicious found in bash or zsh history."
def verify_file(file_):
"""
Check if the file name has an extension in the list of whitelisted file exentsions
param file_: path to file
return: whether or not the file's extension is whitelisted
"""
for ext in file_whitelist:
if len(file_) > len(ext):
if file_[len(file_) - len(ext):] == ext:
return True
return False
def file_check(dir_):
"""
Checks specified dir_ for non-whitelisted files using verify_file()
param dir_: directory to check
return: list of suspicious files
"""
files = glob(dir_ + "/**/*", recursive=True)
suspicious_files = []
for file_ in files:
if not verify_file(file_):
suspicious_files.append(file_)
return suspicious_files

View File

@ -8,24 +8,25 @@ Making a user:
You will be redirected to a login page for the SkoolOS website. If you have already created an account on the website, enter login informatiton. If not, select
the registration button bellow and create an account. Once you create an account via Ion OAuth and SkoolOS, login. The window should close, prompting:
::
Enter SkoolOS Username:
Enter SkoolOS Password:
Enter SkoolOS Username:
Enter SkoolOS Password:
Enter the valid SkoolOS username and password. Congratialations, you have successfully logged in.
Enter the valid SkoolOS username and password. Congratialations, you have successfully logged in.
1. CLI as a teacher:
============
Start the CLI and select your username. For instance, teacher 'eharris1'::
.. code-block:: python
python skoolos.py
? Select User: (Use arrow keys)
1) 2022rkhondak
2) eharris1
3) Make new user
You will then be given the choice to select an existing class, Make a new class, or exit the CLI:::
You will then be given the choice to select an existing class, Make a new class, or exit the CLI:
::
? Select class: (Use arrow keys)
Art12_eharris1
@ -37,7 +38,7 @@ You will then be given the choice to select an existing class, Make a new class,
Making a new class:
-------
Select 'Make a New Class'. You will then be prompted to enter a class name. The format for every class must be <subject>_<teacher_username> (Example: Art12_eharris1).
Select 'Make a New Class'. You will then be prompted to enter a class name. The format for every class must be <subject>_<teacher_username> (Example: Art12_eharris1).
Enter Period (must be a positive integer). You will then be prompted to add students. If you have a list of students, enter the relative path of a text file with the student usernames.
The file must be a .txt file and have one student username per line. If you add an individual student, simply enter their ion username.
one username per line.::
@ -48,12 +49,12 @@ one username per line.::
History12_eharris1
Make New Class
Exit SkoolOS
? Add Students): (Use arrow keys)
1) Add individual student
2) Add list of students through path
3) Exit
? Add Students): 2) Add list of students through path
File must be .txt and have 1 student username per line
Relative Path: students.txt
@ -69,7 +70,6 @@ Accessing an existing class
Once you have created a class, you can then view and modify certain fields. (Open opening a class, any students who have accepted the request will be automatically
added you the class.)::
:
? Select class: (Use arrow keys)
Art12_eharris1
Civ_eharris1
@ -79,7 +79,7 @@ added you the class.)::
Truck_eharris1
Make New Class
Exit SkoolOS
Class: English12_eharris1
? Select option: (Use arrow keys)
1) Request Student
@ -94,7 +94,89 @@ Select 'Request Student'. You will then be prompted to add students. If you have
The file must be a .txt file and have one student username per line. If you add an individual student, simply enter their ion username.
one username per line.::
:
Class: English12_eharris1
? Select option: (Use arrow keys)
1) Request Student
2) Add assignment
3) View student information
4) Exit
? Add list of students (input path): (Use arrow keys)
1) Add individual student
2) Add list of students through path
3) Exit
? Select option: 1) Request Student
? Add list of students (input path): 1) Add individual student
? Student Name: 2022rkhondak
OR::
? Add Students): 2) Add list of students through path
File must be .txt and have 1 student username per line
Relative Path: students.txt
Adding an assignment
-------
To add an assignment, make an assginment subdirectory in the corresponding class wiht at least 1 file. Somehting like:
::
eharris1/English12_eharris1/Assignment1/instruct.txt
You must also put a due date in the correct format.::
? Select new assignment: Assignment1
Enter due date (Example: 2020-08-11 16:58): 2020-08-11 16:58
View student information
-------
You can view certain information of any student requested or confirmed in the given class. Simply select enter their name and see their profile. You are also given the choice
to view their logs (files they have saved, written, git commands, and file that dont match the extention whitelist). Note that as a teacher, you can view a student's current
work at ANY TIME. Simply go to the 'Students' directory and select the student's directory.::
eharris1/Students/English12_eharris1/2022rkhondak
eharris1/Students/English12_eharris1/2023rumareti
? Select option: (Use arrow keys)
1) Request Student
OR::
? Add Students):
1) Add individual student
Student name: 2022rkhondak
Accessing an existing class
=====================
Once you have created a class, you can then view and modify certain fields. (Open opening a class, any students who have accepted the request will be automatically
added you the class.)::
? Select class: (Use arrow keys)
Art12_eharris1
Civ_eharris1
English12_eharris1
History12_eharris1
Random_eharris1
Truck_eharris1
Make New Class
Exit SkoolOS
Class: English12_eharris1
? Select option: (Use arrow keys)
1) Request Student
2) Add assignment
3) View student information
4) Exit
Requesting Students
-------
Select 'Request Student'. You will then be prompted to add students. If you have a list of students, enter the relative path of a text file with the student usernames.
The file must be a .txt file and have one student username per line. If you add an individual student, simply enter their ion username.
one username per line.::
Class: English12_eharris1
? Select option: (Use arrow keys)
1) Request Student
@ -117,137 +199,56 @@ OR::
File must be .txt and have 1 student username per line
Relative Path: students.txt
Adding an assignment
-------
To add an assignment, make an assginment subdirectory in the corresponding class wiht at least 1 file. Somehting like:
eharris1/English12_eharris1/Assignment1/instruct.txt
You must also put a due date in the correct format.
:
? Select new assignment: Assignment1
Enter due date (Example: 2020-08-11 16:58): 2020-08-11 16:58
View student information
-------
You can view certain information of any student requested or confirmed in the given class. Simply select enter their name and see their profile. You are also given the choice
to view their logs (files they have saved, written, git commands, and file that dont match the extention whitelist). Note that as a teacher, you can view a student's current
work at ANY TIME. Simply go to the 'Students' directory and select the student's directory.
eharris1/Students/English12_eharris1/2022rkhondak
eharris1/Students/English12_eharris1/2023rumareti
OR
? Add Students): 1) Add individual student
Student name: 2022rkhondak
Accessing an existing class
=====================
Once you have created a class, you can then view and modify certain fields. (Open opening a class, any students who have accepted the request will be automatically
added you the class.)
? Select class: (Use arrow keys)
Art12_eharris1
Civ_eharris1
English12_eharris1
History12_eharris1
Random_eharris1
Truck_eharris1
Make New Class
Exit SkoolOS
Class: English12_eharris1
? Select option: (Use arrow keys)
1) Request Student
2) Add assignment
3) View student information
4) Exit
Requesting Students
-------
Select 'Request Student'. You will then be prompted to add students. If you have a list of students, enter the relative path of a text file with the student usernames.
The file must be a .txt file and have one student username per line. If you add an individual student, simply enter their ion username.
one username per line.
Class: English12_eharris1
? Select option: (Use arrow keys)
1) Request Student
2) Add assignment
3) View student information
4) Exit
? Add list of students (input path): (Use arrow keys)
1) Add individual student
2) Add list of students through path
3) Exit
? Select option: 1) Request Student
? Add list of students (input path): 1) Add individual student
? Student Name: 2022rkhondak
OR
? Add Students): 2) Add list of students through path
File must be .txt and have 1 student username per line
Relative Path: students.txt
Adding Assignments
-------
To add an assignment, you must first make a subdirectory for that assignment in the given class. You must then add a file wihin that subdirectory. For Example:
For teacher eharris1 and class English11_eharris1, valid assignment folder would look like:
::
eharris1/English11_eharris1/Assignment1/instructions.txt
eharris1/English11_eharris1/Assignment1/instructions.txt
Then, select an assignment from the given options. Then enter a due date in the correct format: YYYY-MM-DD HH:MM. The assignment will then be coppied to every student
who has confirmed the class.
who has confirmed the class.::
Class: Truck_eharris1
GET:200
? Select option: (Use arrow keys)
1) Request Student
2) Add assignment
3) View student information
4) Exit
? Select new assignment: (Use arrow keys)
Assignment1
? Select new assignment: Assignment1
Enter due date (Example: 2020-08-11 16:58): 2020-08-11 16:58
Students in class:
2022rkhondak
Requsted Students:
2023rumareti
View student (Enter student's ion username):
Class: Truck_eharris1
GET:200
? Select option: (Use arrow keys)
1) Request Student
2) Add assignment
3) View student information
4) Exit
? Select new assignment: (Use arrow keys)
Assignment1
? Select new assignment: Assignment1
Enter due date (Example: 2020-08-11 16:58): 2020-08-11 16:58
Students in class:
2022rkhondak
Requsted Students:
2023rumareti
View student (Enter student's ion username):
2. CLI as a student:
============
As a student, you can edit your work for certain classes and submit assignments. By default, your workr directory (your username) has a single readme. AND IT SHOULD STAY THAT WAY.
To make changes to a class, you must first select that class via the CLI.
To make changes to a class, you must first select that class via the CLI.
Select a class first:
::
Select a class first:
? Select class: (Use arrow keys)
English12_eharris1
Art12_eharris1
Random_eharris1
Exit SkoolOS
You can then view the assignments associated with the class. Open you work directory and modify files within your assignments. At any time, you can 'Save' or go 'Back'.
You can then view the assignments associated with the class. Open you work directory and modify files within your assignments. At any time, you can 'Save' or go 'Back'.
When you are ready, you can submit an assignment:
:
::
? Select: (Use arrow keys)
Save
@ -269,5 +270,3 @@ For testing purposes, we recommed having both student and teacher users on the C
On a teacher user (eharris1), add an student to a given class (English12_eharris1). Then, exit out of the CLI and run skoolos.py again, but select a student account.
Selecting a student account should automatically accept the teacher's invitation. You can then begin creating assignments as a teacher. We recommend switching between accounts,
modifying assignments on the students end, exiting, then viewing them in the 'Student' directory as a teacher.

View File

@ -4,13 +4,14 @@ Installation
Git clone repository:
-------
https://gitlab.tjhsst.edu/understudyathon-2020/group-1/schoolos.git
https://gitlab.tjhsst.edu/understudyathon-2020/group-1/skoolos.git
Install repository and create env
-------
cd SkoolOS
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
Run the following commands in order to install SkoolOS:
::
git clone https://gitlab.tjhsst.edu/understudyathon-2020/group-1/skoolos.git SkoolOS
cd SkoolOS
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt

View File

@ -1,2 +1,15 @@
Django Web App
=============
=============
Installing:
-------
Package the Django app and run it on a remote server, to get started,
run a
.. code-block:: python
pip3 install -r requirements.text
python manage.py makemigrations api
python manage.py makemigrations users
python manage.py migrate
Usage:
------

@ -1 +0,0 @@
Subproject commit b80d7ed56b7d649a74be4e7f906d26e7be43702d

View File

@ -18,7 +18,7 @@ import datetime
import os
import argparse
import webbrowser
#from bgservice import bgservice as bg
from bgservice import bgservice as bg
import atexit
client_id = r'QeZPBSKqdvWFfBv1VYTSv9iFGz5T9pVJtNUjbEr6'
@ -88,11 +88,9 @@ def main():
USER = data['username']
print(data['username'])
if data['is_student']:
# empty_logs()
# bg.watch_dir()
# atexit.register(stop_bg_service)
studentCLI(USER, PWD)
atexit.register(stop_bg_service)
else:
teacherCLI(USER, PWD)
@ -100,21 +98,16 @@ def main():
#################################################################################################### STUDENT METHODS
def stop_bg_service():
#bg.stop_watching()
cur_path = os.path.dirname(__file__)
#newpath = os.path.relpath('bgservice/SkoolOS/logs')
# def empty_logs():
# logs_folder = os.path.dirname(__file__) + 'bgservice/SkoolOS/logs/'
# for filename in os.listdir(logs_folder):
# file_path = os.path.join(folder, filename)
# try:
# if os.path.isfile(file_path) or os.path.islink(file_path):
# os.unlink(file_path)
# elif os.path.isdir(file_path):
# shutil.rmtree(file_path)
# except Exception as e:
# print('Failed to delete %s. Reason: %s' % (file_path, e))
print("good")
bg.stop_watching()
print('also')
cur_path = os.path.dirname('') # Change to definite SkoolOS dir
print('yes')
newpath = os.path.relpath('bgservice/SkoolOS/logs/')
logText = ""
with open(newpath + '/skooloslog', 'r') as logfile:
logfile.read()
print (logText)

@ -1 +0,0 @@
Subproject commit ca356ef8532873bf52ec67a647fbb91a25ca1cb7

@ -1 +0,0 @@
Subproject commit 4df0d29276f82f25d75cd03e53ca5b754a10db1f

View File

@ -1 +0,0 @@
its hailstone easy