Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SKIL-555 #804

Merged
merged 51 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
571e9bb
Add unit class
jcallison1 Nov 21, 2024
6598a8b
Form initial state now accepts unit class type
ebanderson3 Nov 23, 2024
9af59fa
UnitOfAssessmentTab now builds tabs based off of unit class
ebanderson3 Nov 23, 2024
9c44626
UnitOfAssessmentTab uses abstract unit class to create unitList
ebanderson3 Nov 30, 2024
da79ea6
Changed unitValue to unitIndex
ebanderson3 Dec 2, 2024
6fe01b5
Updated naming of some unit accessing variables and updated parameter…
ebanderson3 Dec 2, 2024
6969bb2
Convert CAT to use Unit class for student view only
jcallison1 Dec 2, 2024
63d7eec
Clean up unit.js and add functionality for admins and TAs
jcallison1 Dec 3, 2024
4df32cd
FIx some linter errors
jcallison1 Dec 3, 2024
4cc0dca
Various bugfixes to get units working
ebanderson3 Dec 3, 2024
2496993
Fixed Unit Tab display
ebanderson3 Dec 3, 2024
f058fa9
Add clone function to unit
jcallison1 Dec 3, 2024
038ced3
Removed unitValue from more places and clarified variable name
ebanderson3 Dec 3, 2024
caa6f0f
Merge branch 'SKIL-555' of https://github.com/Lunatic-Labs/rubricapp …
ebanderson3 Dec 3, 2024
4503407
Add modifyUnitCategoryInformation
jcallison1 Dec 3, 2024
3842eb6
Merge branch 'SKIL-555' of https://github.com/Lunatic-Labs/rubricapp …
jcallison1 Dec 3, 2024
6c3b154
Migrate all setWhatever functions to use modifyUnitCategoryInformation
jcallison1 Dec 3, 2024
d8589f6
FIx small issue
jcallison1 Dec 3, 2024
dce715a
Added submit functionality.
ebanderson3 Dec 3, 2024
bf3000e
Fixed function typo
ebanderson3 Dec 3, 2024
a9018f0
Fixed typo 2
ebanderson3 Dec 3, 2024
15c6168
Removed componentDidUpdate
ebanderson3 Dec 3, 2024
15960e7
Updated StatusIndicator to use an enum
ebanderson3 Dec 16, 2024
5de4c78
Pull status indicator logic into other function
jcallison1 Dec 16, 2024
52cf5cd
Add categoryNames
jcallison1 Dec 16, 2024
759d801
Updated how status is retrieved to reuse code for UnitOfAssessmentTab…
ebanderson3 Dec 16, 2024
f9133f2
FIx stuff and make it work
jcallison1 Dec 16, 2024
a4d4628
Fix pure render error
jcallison1 Dec 16, 2024
c499165
Unit circles turn green when the done button is pushed
ebanderson3 Dec 16, 2024
cf90c54
Make saving work and updating the CAT entry in the unit objects
jcallison1 Dec 17, 2024
e5215ef
Fix issue with units becoming undone when changing things
jcallison1 Dec 17, 2024
0b9a754
Make checkin live stream work and fix some bugs
jcallison1 Dec 19, 2024
e3a133a
Remove import
jcallison1 Dec 19, 2024
1c00e14
Renamed variables, cleaned up formatting, and removed redundent code
jcallison1 Dec 20, 2024
6e8616d
Clean up submitting an AT
jcallison1 Dec 20, 2024
948e49a
Updated UnitOfAssessmentTab with JSDoc comment
ebanderson3 Dec 20, 2024
3be9bd7
Updated cat_utils.js with JSDoc comments
ebanderson3 Dec 20, 2024
762dcf3
Updated Section.js with JSDoc comments, and renamed currentData to cu…
ebanderson3 Dec 20, 2024
f06c533
Updated Form.js with JSDoc comments.
ebanderson3 Dec 20, 2024
66214af
Updated CompleteAssessmentTask.js with JSDoc comments.
ebanderson3 Dec 20, 2024
74ba4bf
Add modifyUnitCategoryProperty
jcallison1 Dec 20, 2024
c9a8f83
Clean up Section.js and children
jcallison1 Dec 21, 2024
95844c9
Pull out some redundent code when creating units
jcallison1 Dec 21, 2024
38a3d17
Remove possible buggy update the old cat code
jcallison1 Dec 21, 2024
0ece360
Improve documentation for units.js
jcallison1 Dec 21, 2024
8108cd7
Merge branch 'master' into SKIL-555
sah0017 Dec 21, 2024
b07ef5e
Fix bug with quickly switching tabs messing up autosave
jcallison1 Dec 21, 2024
576339d
Fix issue with starting and finishing a unit without leaving the scre…
jcallison1 Dec 21, 2024
412faa1
Merge branch 'master' into SKIL-555
jcallison1 Dec 21, 2024
dfd5ae1
Merge branch 'SKIL-555' of https://github.com/Lunatic-Labs/rubricapp …
sah0017 Dec 23, 2024
9af597a
fixed constraint issue for updating a completed assessment.
sah0017 Dec 23, 2024
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
12 changes: 10 additions & 2 deletions BackEndFlask/controller/Routes/Completed_assessment_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,23 @@ def add_completed_assessment():
@admin_check()
def update_completed_assessment():
try:
assessment_data = request.json
team_id = int(assessment_data["team_id"])
if (team_id == -1):
assessment_data["team_id"] = None
user_id = int(assessment_data["user_id"])
if (user_id == -1):
assessment_data["user_id"] = None

completed_assessment_id = request.args.get("completed_assessment_id")

updated_completed_assessment = None

if(completed_assessment_id):
updated_completed_assessment = replace_completed_assessment(request.json, completed_assessment_id)
updated_completed_assessment = replace_completed_assessment(assessment_data, completed_assessment_id)

else:
updated_completed_assessment = create_completed_assessment(request.json)
updated_completed_assessment = create_completed_assessment(assessment_data)

return create_good_response(completed_assessment_schema.dump(updated_completed_assessment), 201, "completed_assessments")

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
!! Delete this file after Ad Hoc Teams have been integrated into unit.js and CompleteAssessmentTask.js !!

Form.js and it's children have been transitioned to use units rather than reference specific database units. This allows Complete Assessment Task (CAT) data to be handled the same way regardless of the type of unit being handled. The logic for units is contained entirely in "unit.js" through the abstract class `ATUnit` and its children, `IndividualUnit` and `FixedTeamUnit`. These units are created in `generateUnitList()` and their own respective creation functions: `createIndividualUnit` and `createFixedTeamUnit`. An enum `UnitType` is used to help determine the type of a unit.

"CompleteAssessmentTask.js" is in charge of fetching the unit information for all types of units from the backend, and calling `generateUnitList()` with the correct arguments. "unit.js" holds all of the logic for the unit classes and creation.

Here's what we think will need to be changed to update these files for Ad Hoc teams:

"CompleteAssessmentTask.js":
- Update Fetches to include Ad Hoc data
- Pass in new information into `generateUnitList()`

"unit.js":
- Use ad hoc UnitType in enum
- Add new child class of ATUnit for ad hoc units
- Update unit list generation in generateUnitList
- Create new functions to createAdHocUnits
- Likely will need to track ad hoc team members with a CheckinTracker Object from cat_utils.js

Check for any places that assume fixed teams. We removed as many of these as we could find, but we may have missed a couple.
Loading
Loading