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/Website/api/models.py b/Website/api/models.py index 1dc6f18..ba2fc87 100644 --- a/Website/api/models.py +++ b/Website/api/models.py @@ -10,6 +10,7 @@ class Student(models.Model): grade = models.IntegerField(default=0, blank=True) log = models.TextField(default="", blank=True) git=models.CharField(default="", max_length=100, blank=True) + log = models.TextField(default="", blank=True) repo=models.URLField(default="", blank=True) classes=models.CharField(max_length=100, default="", blank=True) added_to=models.CharField(max_length=100, default="", blank=True) diff --git a/docs/source/background_service.rst b/docs/source/background_service.rst index a54992f..c17a079 100644 --- a/docs/source/background_service.rst +++ b/docs/source/background_service.rst @@ -2,4 +2,15 @@ Background Service ================= This requires no user input. The proper events are -called by the main application to log events in the student's work directory. +called by the main application to log events in the +student's work directory. The service records file +accesses, editions, deletions, files moved from an +outside directory, and file to an outside directory. +Additionally, it records any git commands discovered +in the student's .bash_history or .histfile (zsh +equivalent), as git commands can interfere with the +service. It also checks for files that do not have +extensions that are whitelisted. The whitelist +includes common file extensions such as text files, +presentations, and programming file extensions (e.g. +.py for python and .class for java). diff --git a/docs/source/cli.rst b/docs/source/cli.rst index f6da1ad..eb4ad14 100644 --- a/docs/source/cli.rst +++ b/docs/source/cli.rst @@ -17,8 +17,8 @@ Enter the valid SkoolOS username and password. Congratialations, you have succes 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 @@ -69,6 +69,7 @@ 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 @@ -93,6 +94,7 @@ 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 @@ -117,3 +119,155 @@ 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 + +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 + +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. + +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. + +:: + + 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 + +3. Testing: +============ + +For testing purposes, we recommed having both student and teacher users on the CLI. + +1. Adding students/confiming + +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. + + diff --git a/eharris1/Truck_eharris1/Assignment1/instructions.txt b/eharris1/Truck_eharris1/Assignment1/instructions.txt new file mode 100644 index 0000000..e69de29