Skip to content

Conversation

@GabrielCWT
Copy link
Contributor

Changes

  • Implement helper function to parse string to atom and from string to int.
  • Refactor submissions_by_grader_for_index to have its controller parse the inputs into atoms and pass an atom hashmap to the function instead.
  • Refactor sorting functions for submissions_by_grader_for_index to use atoms and use pattern matching.
  • Combine sorting functions into one, using sort_direction to order the rows either by asc or desc
  • Update corresponding tests

Closes: #1174 #1175

@GabrielCWT GabrielCWT self-assigned this Sep 18, 2024
@coveralls
Copy link

coveralls commented Sep 18, 2024

Coverage Status

coverage: 94.324% (-0.05%) from 94.372%
when pulling 892b5d4 on GabrielCWT:refactor/string-to-atoms
into c0d95e9 on source-academy:master.

@RichDom2185 RichDom2185 linked an issue Sep 19, 2024 that may be closed by this pull request
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 a lot!

@RichDom2185 RichDom2185 merged commit 85a3c1e into source-academy:master Sep 19, 2024
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.

Use pattern matching instead of cond..do Server-side pagination params should use atoms, not string

3 participants