Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion TFrepo/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ This folder has files that relates to the fake data made for testing purposes. F
# 2. forms folder
All the forms on the website that requires any UI or logic customization.

See [files](forms_files.md).

# 3. management folder
When you want to make a terminal command, the files are done here. All of these commands can only be run with system administrator access.

Expand All @@ -27,7 +29,9 @@ These are migration files for the database that are auto-generated via command l
All the database model files.

# 6. tasks folder
The files in this folder pertain to any asynchronous data processing tasks needed on the site where we do not want to keep the user waiting.
The files in this folder pertain to any asynchronous data processing tasks needed on the site where we do not want to keep the user waiting.

See [files](tasks_files.md).

# 7. team_generator folder (bowen to do)
This folder contains all the team algorithm details.
Expand Down
61 changes: 61 additions & 0 deletions TFrepo/forms_files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 2. forms folder

## Top level files
* <font color=#099>__init__.py</font>
* <font color=#099>base.py</font> - a template form used for other forms in this forms folder.
* <font color=#099>generate_team.py</font> - forms used to generate new teams
(1) GeneratedGroupSetSetupForm - used to generate teams on the Teams page in the List of Team Sets section (step 1/2). Form seen after pressing the button Generate Teams.
(2) NewTeamSizeOptionForm - used to generate teams (step 2/2) with details on tweaking the algorithm chosen from the previous step.
(3) NewBlacklistOptionForm - used to generate teams (step 2/2) with details about including Enemies Preference into the algorithm chosen from the previous step.
(4) NewWeightOptionForm - used to generate teams (step 2/2) with details about the weights depending on the algorithm chosen.
(5) NewDiversityOptionForm - used to generate teams (step 2/2) with details on tweaking the chosen algorithm (weight algorithm & social algorithm).
(6) NewPeerEvaluationOptionForm - Not in use.
(7) NewPriorityOptionForm - used to generate teams (step 2/2) with details on tweaking the chosen algorithm (priority algorithm).
(8) RegenerateGroupsForm - used to take the input of a list of teams that the user may lock for regenerating groups.

* <font color=#099>gradebook_graph.py</font> - Not in use.
* <font color=#099>label_value.py</font> - responsible for taking in peer evaluation attributes.
Form is used in (step 2/2) after clicking button Create New Peer Evaluation Attribute on the Peer Evaluation page and .
(step 2/2) of creating a new attribute in the Attribute page.
* <font color=#099>new_answer_group.py</font> - the section where a newly created answer group is asked within Create New Attribute step 2/2.
* <font color=#099>new_question.py</font> - represents the questions asked for Create New Attribute step 2/2.
* <font color=#099>new_section.py</font> - used to ask the name of a new section within Create New Section or Edit section.
* <font color=#099>peer_eval.py</font> - used to create new peer evaluations. Access form by the Create New Peer Evaluation on the Peer Evaluation page.
* <font color=#099>peer_eval_vector.py</font> - forms related to peer evaluation attributes.
(1) PeerEvalVectorJunctionForm - the last section to create new peer evaluations. Access form by the Create New Peer Evaluation on the Peer Evaluation page.
(2) SelectPeerEvalVectorForm - Not in use.
(3) PeerEvalVectorForm - used to create new peer evaluation attributes. Access form by the button Create New Peer Evaluation Attribute in step 2/2.
(4) PeerEvalMultipleChoiceVectorForm - maps to the PeerEvalMultipleChoiceVector model.
(5) PeerEvalCheckboxVectorForm - maps to the PeerEvalCheckboxVector model.
(6) PeerEvalTextInputVectorForm - maps to the PeerEvalTextInputVector model.
* <font color=#099>project.py</font>
* (1) ProjectSetForm - used to create new project sets. Accessed by the button Create New Project Set.
* (2) ProjectForm - used to create new project. Accessed by the button Edit on selected project set and the button to Add New Project.
* (3) ProjectRequirementForm - used to create new project. Accessed by the button Edit on selected project set and the button to Add New Project.
* (4) ProjectDuplicateForm - used to ask how many projects the user would like to duplicate from a selected project. Accessed by the button Duplicate on a selected project (Edit on a selected project set).

* <font color=#099>survey.py</font> - used to create new surveys.
* <font color=#099>vector.py</font> - related to creating surveys and attributes.
(1) SelectSurveyVectorForm - Not in use.
(2) SurveyVectorJunctionForm - used to create new surveys.
(3) SurveyVectorForm - a template form used for other forms in this file.
(4) SurveyPreferenceVectorForm - used to define VECTOR_TYPES (attriubte types). Form accessed by step 1/2 of creating a new attribute.
(5) SurveyBlacklistVectorForm - used to define VECTOR_TYPES (attriubte types). Form accessed by step 1/2 of creating a new attribute.
(6) SurveyComplexMultipartVectorForm - used to define VECTOR_TYPES (attriubte types). Form accessed by step 1/2 of creating a new attribute.
(7) SurveyMultipleChoiceVectorForm - used to define VECTOR_TYPES (attriubte types). Form accessed by step 1/2 of creating a new attribute.
(8) SurveyCheckboxVectorForm - used to define VECTOR_TYPES (attriubte types). Form accessed by step 1/2 of creating a new attribute.

## forms: fields
* <font color=#099>__init__.py</font>
* <font color=#099>custom_form_field.py</font> - form field templates used in other files in the form folder.

## forms: formsets
* <font color=#099>__init__.py</font>
* <font color=#099>peer_eval_vector.py</font> - customize forsets for peer evaluation attribute forms.
* <font color=#099>project.py</font> - customize forsets for project forms.
* <font color=#099>util.py</font> - a formset template used in other files in the folder.
* <font color=#099>vector.py</font> - customize forsets for attribute forms.

## forms: widgets
* <font color=#099>__init__.py</font>
* <font color=#099>integer_select.py</font> - customize widgets.
19 changes: 19 additions & 0 deletions TFrepo/models_files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 5. models folder

* <font color=#099>__init__.py</font>
* <font color=#099>attendance.py</font>
* <font color=#099>canvas_course.py</font>
* <font color=#099>canvas_group.py</font>
* <font color=#099>canvas_user.py</font>
* <font color=#099>canvas_onboard.py</font>
* <font color=#099>generated_group.py</font>
* <font color=#099>group_settings.py</font>
* <font color=#099>information_log.py</font>
* <font color=#099>peer_eval_vector.py</font>
* <font color=#099>peer_evaluation.py</font>\
* <font color=#099>project.py</font>
* <font color=#099>question.py</font>
* <font color=#099>survey.py</font>
* <font color=#099>vector.py</font>
* <font color=#099>vector_quiz_question.py</font>
* <font color=#099>vector_response.py</font>
8 changes: 8 additions & 0 deletions TFrepo/tasks_files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 6. tasks folder
Related to transaction with the database.

* <font color=#099>__init__.py</font>
* <font color=#099>attendance_tasks.py</font> - updates the database of setting course attendance status to false.
* <font color=#099>import_tasks.py</font> - updates the database of teams info including team names, ids, members' Canvas info.
* <font color=#099>team_generation_tasks.py</font> - related to saving data between Canvas and the database. Data such as
course info, students, roles, students' enrollment status, and team sets on both end.
16 changes: 7 additions & 9 deletions TFrepo/templatetages_files.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# 9. templatetags
This folder handles the logic to display for some tab on the app: Attributes (vector_extras.py),
Projects (projects_extras.py), Teams (teams_extras.py), Peer Evaluations (peer_eval_extras.py).

Additional functions other than the ones called from the utils folder will be explained below:
Functions within files under this folder accept value(s) or an optional argument, and return a value to be displayed
on the page.

* <font color=#099>__init__.py</font>
* <font color=#099>algorithm_extras.py</font> - corresponds to the file under utils folder: teams: algorithm.py
* <font color=#099>app_extras.py</font> - functions to run the app including request-related, etc. Also, functions calling the utils folders nav-bar related, setup related, etc.
* <font color=#099>peer_eval_extras.py</font>
* <font color=#099>project_extras.py</font>
* <font color=#099>team_extras.py</font>
* <font color=#099>vector_extras.py</font>
* <font color=#099>app_extras.py</font> - functions to run the app including request-related, etc. Also, includes functions calling the utils folders nav-bar related, setup related, etc.
* <font color=#099>peer_eval_extras.py</font> - getter functions and helper functions to get peer evaluation questions, team, names, summaries of feedback and stats of scores etc.
* <font color=#099>project_extras.py</font> - includes a function to get the form under forms folder: project.py
* <font color=#099>team_extras.py</font> - includes a form to regenerate team using form defined under forms folder: generate_team.py
* <font color=#099>vector_extras.py</font> - includes getter functions to determine attribute types and details.
20 changes: 9 additions & 11 deletions TFrepo/views_files.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# 12. views
There is one file per that handles the logic for each tab on the app: Section (sections.py), Students (students.py),
Attributes (vector.py), Projects (projects.py), Surveys (survey), Teams (teams.py),
Peer Evaluations (peer_evaluation.py).
In this folder, each file has python functions that takes http requests, load a template from the template folder
, and returns http response with the result of the rendered template.

Additional explanation of the other files are below:

* <font color=#099>__init__.py</font>
* <font color=#099>admin.py</font> - specific to the admin interface
* <font color=#099>course.py</font> - for page that lists courses available to the logged in user (this view is skipped when integrated directly on Canvas)
* <font color=#099>peer_eval_vector.py</font> - creating attributes specific to peer evaluations
* <font color=#099>peer_evaluation.py</font> - handles functions related to the peer evaluations page. Including creation, view, deletion of peer evaluations etc.
* <font color=#099>projects.py</font>
* <font color=#099>question.py</font> - handling question form and associating the answer group for the attribute
* <font color=#099>sections.py</font>
* <font color=#099>student.py</font>
* <font color=#099>survey.py</font>
* <font color=#099>teams.py</font>
* <font color=#099>vector.py</font>
* <font color=#099>projects.py</font> - handles http requests made on the Project page and displays the Project page.
* <font color=#099>question.py</font> - handling http requests and displays forms and associating the answer group for an attribute.
* <font color=#099>sections.py</font> - handles http requests made on the Section page and displays the Sections page.
* <font color=#099>student.py</font> - handles http requests made on the Student page and displays the Student page.
* <font color=#099>survey.py</font> - handles http requests made on the Survey page and displays the Survey page.
* <font color=#099>teams.py</font> - handles http requests made on the Teams page and displays the Team page.
* <font color=#099>vector.py</font> - handles http requests made on the Attribute page and displays the Attribute page.