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

Refactor submissions_by_grader_for_index and related functions to use piping #1103

Open
6 tasks
GabrielCWT opened this issue Apr 6, 2024 · 1 comment
Open
6 tasks

Comments

@GabrielCWT
Copy link
Contributor

GabrielCWT commented Apr 6, 2024

In order to keep styling consistent throughout the backend, piping should be used in the following functions

  • submissions_by_grader_for_index
  • build_user_filter
  • build_assessment_filter
  • build_assessment_config_filter
  • build_submission_filter
  • build_course_registration_filter
@GabrielCWT GabrielCWT changed the title Refactor submissions_by_grader_for_index function to use piping Refactor submissions_by_grader_for_index and related functions to use piping Apr 6, 2024
@GabrielCWT
Copy link
Contributor Author

GabrielCWT commented Apr 6, 2024

As an add on, I feel that it could be possible that after the refactor submissions_by_grader_for_index's count query can go before the submissions query such that there is less repeated code.

query = big_query_here

count = query |> select([...], count(s.id)) |> Repo.one()
submissions = query |> limit(...) |> offset(...) |> select(...) |> Repo.all()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant