Merge branch 'development' of github.com:Rushilwiz/SkoolOS into development

merge
This commit is contained in:
Rushil Umaretiya 2020-06-16 23:57:17 -04:00
commit cd716f1ecc
4 changed files with 130 additions and 130 deletions

View File

@ -569,7 +569,7 @@ class Teacher:
'due_date': str(due), 'due_date': str(due),
'owner':self.id '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) course['assignments'].append(oname)
cinfo = { cinfo = {

View File

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

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 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: 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 the valid SkoolOS username and password. Congratialations, you have successfully logged in.
Enter SkoolOS Password:
Enter the valid SkoolOS username and password. Congratialations, you have successfully logged in.
1. CLI as a teacher: 1. CLI as a teacher:
============ ============
Start the CLI and select your username. For instance, teacher 'eharris1'::
.. code-block:: python
python skoolos.py python skoolos.py
? Select User: (Use arrow keys) ? Select User: (Use arrow keys)
1) 2022rkhondak 1) 2022rkhondak
2) eharris1 2) eharris1
3) Make new user 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) ? Select class: (Use arrow keys)
Art12_eharris1 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: 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. 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. 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.:: one username per line.::
@ -48,12 +49,12 @@ one username per line.::
History12_eharris1 History12_eharris1
Make New Class Make New Class
Exit SkoolOS Exit SkoolOS
? Add Students): (Use arrow keys) ? Add Students): (Use arrow keys)
1) Add individual student 1) Add individual student
2) Add list of students through path 2) Add list of students through path
3) Exit 3) Exit
? Add Students): 2) Add list of students through path ? Add Students): 2) Add list of students through path
File must be .txt and have 1 student username per line File must be .txt and have 1 student username per line
Relative Path: students.txt 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 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.):: added you the class.)::
:
? Select class: (Use arrow keys) ? Select class: (Use arrow keys)
Art12_eharris1 Art12_eharris1
Civ_eharris1 Civ_eharris1
@ -79,7 +79,7 @@ added you the class.)::
Truck_eharris1 Truck_eharris1
Make New Class Make New Class
Exit SkoolOS Exit SkoolOS
Class: English12_eharris1 Class: English12_eharris1
? Select option: (Use arrow keys) ? Select option: (Use arrow keys)
1) Request Student 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. 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.:: 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 Class: English12_eharris1
? Select option: (Use arrow keys) ? Select option: (Use arrow keys)
1) Request Student 1) Request Student
@ -117,137 +199,56 @@ OR::
File must be .txt and have 1 student username per line File must be .txt and have 1 student username per line
Relative Path: students.txt 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 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: 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: 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 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 Class: Truck_eharris1
GET:200 GET:200
? Select option: (Use arrow keys) ? Select option: (Use arrow keys)
1) Request Student 1) Request Student
2) Add assignment 2) Add assignment
3) View student information 3) View student information
4) Exit 4) Exit
? Select new assignment: (Use arrow keys) ? Select new assignment: (Use arrow keys)
Assignment1 Assignment1
? Select new assignment: Assignment1 ? Select new assignment: Assignment1
Enter due date (Example: 2020-08-11 16:58): 2020-08-11 16:58 Enter due date (Example: 2020-08-11 16:58): 2020-08-11 16:58
Students in class: Students in class:
2022rkhondak 2022rkhondak
Requsted Students: Requsted Students:
2023rumareti 2023rumareti
View student (Enter student's ion username): View student (Enter student's ion username):
2. CLI as a student: 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. 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) ? Select class: (Use arrow keys)
English12_eharris1 English12_eharris1
Art12_eharris1 Art12_eharris1
Random_eharris1 Random_eharris1
Exit SkoolOS 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: When you are ready, you can submit an assignment:
::
:
? Select: (Use arrow keys) ? Select: (Use arrow keys)
Save 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. 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, 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. 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: 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 Install repository and create env
------- -------
Run the following commands in order to install SkoolOS:
cd SkoolOS ::
python3 -m venv env git clone https://gitlab.tjhsst.edu/understudyathon-2020/group-1/skoolos.git SkoolOS
source env/bin/activate cd SkoolOS
pip install -r requirements.txt python3 -m venv env
source env/bin/activate
pip install -r requirements.txt