-
Notifications
You must be signed in to change notification settings - Fork 245
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
Marks Spreadsheet csv bug fix #7257
Marks Spreadsheet csv bug fix #7257
Conversation
Pull Request Test Coverage Report for Build 11181724253Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@donny-wong my recommendation is to start with the equivalent query for the instructor role, then add a join to the grade_entry_students_tas
table, and then filter for the ta_id
being equal to the role_id
.
When developing more complex ActiveRecord queries, the Rails console (rails c
) is very useful for experimenting to get it right.
Proposed Changes
In the grade_entry_form.rb file under the role TA, strangely one of the join queries when Rails translates to sql, it duplicates it:
INNER JOIN "grades" ON "grades"."grade_entry_student_id" = "grade_entry_students"."id"
INNER JOIN "grades" "grades_grade_entry_students_join" ON "grades_grade_entry_students_join"."grade_entry_student_id" = "grade_entry_students"."id"
This creates an incorrect grade_data result, thus the Marks Spreadsheet download has incorrect marks for students. Inserting raw SQL corrected this issue, however, it is not ideal.
...
Screenshots of your changes (if applicable)
Associated documentation repository pull request (if applicable)
Type of Change
(Write an
X
or a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]
into a[x]
in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments
(Include any questions or comments you have regarding your changes.)