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

fix sorting for grading #1155

Merged
merged 3 commits into from
Aug 20, 2024

Conversation

thortol
Copy link
Contributor

@thortol thortol commented Aug 19, 2024

Description

Currently there is a bug in source academy grading table where users are unable to sort by username and group

Changes

  • There was a bug where a left join condition was done on user.id == submissions.student_id and user.id == courseRegistration.user_id
  • However, in the schema the conditions are courseRegistration.id == submissions.student_id and courseRegistration.user_id == user.id
  • An additional bug was found during testing where the same row kept appearing every page. This happens when submission.inserted_at is the same which prevents LIMIT from working as the sort may be inconsistent.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Code quality improvements

Checklist

  • I have tested this code
  • I have updated the documentation

@coveralls
Copy link

coveralls commented Aug 19, 2024

Coverage Status

coverage: 94.38% (+0.002%) from 94.378%
when pulling f84156e on thortol:fix-sorting-for-grading
into ddd4378 on source-academy:master.

@thortol thortol self-assigned this Aug 19, 2024
Copy link
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@RichDom2185 RichDom2185 merged commit e6a9618 into source-academy:master Aug 20, 2024
2 checks passed
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.

3 participants