diff --git a/.1.sstern1profile b/.1.sstern1profile new file mode 100644 index 0000000..b141284 --- /dev/null +++ b/.1.sstern1profile @@ -0,0 +1 @@ +{"username": "eharris1", "is_student": false, "password": "hackgroup1"} \ No newline at end of file diff --git a/docs/source/cli.rst b/docs/source/cli.rst index f6da1ad..c139eaf 100644 --- a/docs/source/cli.rst +++ b/docs/source/cli.rst @@ -117,3 +117,65 @@ OR:: 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 + 2) Add assignment + ❯ 3) View student information + 4) Exit + + 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. + + 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'. +When you are ready, you can submit an assignment: + + ? Select: (Use arrow keys) + Save + ❯ Submit assignment + Back + Exit SkoolOS + + ? Select: (Use arrow keys) + Assignment1 + ❯ Back + +2. CLI as a student: +============ + diff --git a/skoolos.py b/skoolos.py index 82fbe17..3284756 100644 --- a/skoolos.py +++ b/skoolos.py @@ -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,8 +88,8 @@ def main(): USER = data['username'] print(data['username']) if data['is_student']: - empty_logs() - bg.watch_dir() + # empty_logs() + # bg.watch_dir() studentCLI(USER, PWD) atexit.register(stop_bg_service) @@ -100,21 +100,21 @@ def main(): #################################################################################################### STUDENT METHODS def stop_bg_service(): - bg.stop_watching() + #bg.stop_watching() cur_path = os.path.dirname(__file__) - newpath = os.path.relpath('bgservice/SkoolOS/logs') + #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)) +# 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))