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

SKIL-555 #804

merged 51 commits into from
Jan 9, 2025

Conversation

jcallison1
Copy link
Contributor

TODOs Completed:

  • Redesigned the CompleteAssessmentTask family of files to use a new class based Unit system.
  • Cleaned up CompleteAssessmentTask code and made it easier to read.
  • Added extensive comments to help future developers work on the CompleteAssessmentTask system with less friction.

jcallison1 and others added 30 commits November 20, 2024 20:05
Copy link
Collaborator

@aparriaran aparriaran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sah0017 LGTM

Copy link
Contributor

@sah0017 sah0017 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is (still?) a bug in the saving of data. I opened the demo data for Critical Thinking Assessment, Maria only has 2 categories filled in. I filled in the remaining categories, hit Done, she went to green. I edited Wade Cooper, put data in the first 2 categories. The Autosaving message popped up. Went back and hit View, looked at Maria, the categories I had filled in were not there, and only the first of the two categories I filled in for Wade was saved. I don't know if this was a preexisting bug (I think it may have been).

I don't see where you merged master back into SKIL-555 after you finished. Would you do that and make sure everything merges appropriately? I merged the updated package.json to update the React packages, so you'll need to npm install after you merge master (or is this handled by docker?)

@jcallison1
Copy link
Contributor Author

For some reason I couldn't reproduce the exact issue you described, however I did fix two highly related issues I found. Hopefully one of those was the root cause of the issue you described. I will now work on merging master into our branch. Unfortunately that may take a while, as I was never able to get MySQL working on my computer after the MySQL migration.

@jcallison1
Copy link
Contributor Author

I have merged master and everything still seems to be working correctly.

@jcallison1 jcallison1 requested a review from sah0017 December 22, 2024 16:59
@sah0017
Copy link
Contributor

sah0017 commented Dec 23, 2024

@jcallison1 Did you run npm install? I'm getting a lot of npm package errors when I run your code like it is still using the code/packages from the previous versions before I updated them.

@sah0017
Copy link
Contributor

sah0017 commented Dec 23, 2024

@jcallison1 I'm still having the issue that I described above. It doesn't appear to save for me past the first category tab, or it isn't retrieving it, one or the other. You're not having that issue in your environment?

Edit: my problem my be related to the Bug you opened in Jira. I'm getting a bunch of 401 unauthorized messages in my console. But I'm logged in as the demo admin.

Another edit: Looks like it's a constraint issue:
2024-12-22 20:48:38,360 - ERROR - Bad response sent: user_id: 2, content type: completed_assessments, msg: An error occurred replacing completed_assessment (pymysql.err.IntegrityError) (1452, 'Cannot add or update a child row: a foreign key constraint fails (rubricapp.completedassessment, CONSTRAINT completedassessment_ibfk_3 FOREIGN KEY (team_id) REFERENCES team (team_id))')
[SQL: UPDATE CompletedAssessment SET team_id=%(team_id)s, last_update=%(last_update)s, rating_observable_characteristics_suggestions_data=%(rating_observable_characteristics_suggestions_data)s, done=%(done)s WHERE CompletedAssessment.completed_assessment_id = %(CompletedAssessment_completed_assessment_id)s]
[parameters: {'team_id': -1, 'last_update': datetime.datetime(2024, 12, 23, 2, 48, 38, 344000), 'rating_observable_characteristics_suggestions_data': '{"done": false, "comments": "", "Analyzing": {"rating": 1, "comments": "", "description": "Interpreted information to determine meaning and to extrac ... (1762 characters truncated) ... idence", "1": "Minimally", "2": "", "3": "Partially", "4": "", "5": "Completely"}, "suggestions": "00010000", "observable_characteristics": "00010"}}', 'done': 1, 'CompletedAssessment_completed_assessment_id': 1}]
(Background on this error at: https://sqlalche.me/e/20/gkpj), status: 400, error raised from function: update_completed_assessment
127.0.0.1 - - [22/Dec/2024 20:48:38] "PUT /api/completed_assessment?completed_assessment_id=1&user_id=2 HTTP/1.1" 400 -

@sah0017
Copy link
Contributor

sah0017 commented Dec 23, 2024

I had fixed the constraint issue for adding an assessment, but not for updating an assessment, so I went ahead and applied that fix in your branch. That resolved the issue I was having with it saving subsequent categories.

Copy link
Contributor

@sah0017 sah0017 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (after fixing DB constraint issue)

@sah0017 sah0017 merged commit 303e805 into master Jan 9, 2025
1 check passed
@sah0017 sah0017 deleted the SKIL-555 branch January 9, 2025 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants