Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add migrations to create is_grading_published column for submissions Current submissions will have the is_grading_published field populated as `true` if all answers have been graded i.e. have a grader_id, while the rest will default to `false`. Future submissions will have the field with default value `false` upon creation. * Add and update endpoints for new publish grading feature - Update existing endpoints and queries related to assessment retrieval - Add new routes and endpoints to handle new publish grading feature - Add notification for new feature * Fix missing return tuple values in assessments.ex * Fix notification and formatting * Fix indentation and minor error * Fix formatting * fix formatting * fix credo long line * fix credo nesting alias * Fix formatting and code quality * Fix tests * feat: Implement format helper function Changing xp in the assessment_with_questions_and_answers is the wrong direction, I feel that the function should not be tied to a specific format. Instead, I will call a helper function in the controller to format the xp. * feat: Add formatting function for getting all assessments * fix: Fix bug of using virtual variable instead * refactor: Remove default value for virtual variable is_grading_published * feat: Implement tests for helper functions * feat: Add isGradingPublished to response for fetching all assessments * refactor: Format * chore: Remove unused match * feat: Implement tests for unpublish route * feat: Implement tests for publish route * refactor: Move repeated code into setup for publish test * refactor: Move repeated code into setup for unpublish test * refactor: Format code * feat: Add a guard to prevent unsubmit when grade is still published * feat: Implement filter by notPublished * refactor: Format * fix: Fix incorrect guard check for is_grading_published * refactor: Edit tests to accommodate new guard * feat: Implement test for new guard (check is_grading_published) * feat: Update seed to include is_grading_published * refactor: Update old tests to accommodate for is_grading_published * refactor: Improve filter tests to be more flexible Remove hard coded numbers and count expected number with students_with_assessment_info * feat: Implement test for filter by not published * chore: Format * refactor: Make is_grading_published default to false in factory function * feat: Add is_grading_auto_published column to assessment config * feat: Add guard clause to ensure submission is fully graded before publishing * feat: Implement publish_grading and is_fully_autograded? - Adds another publish_grading function which bypasses all checks - Adds a new function is_fully_autograded? which checks if all answers are successfully auto graded * chore: Clean up code * feat: Add is_grading_auto_published and is_manually_graded to seed * feat: Implement tests for is_fully_autograded?/1 * feat: Implement publish_all_grades route * feat: Add publish_all_grades in controller * feat: Implement publish_all_graded function * feat: Implement tests for publish_all_graded/2 * refactor: Rename param names and allow filter by true or false * refactor: Add tests for change in param and refactor code * refactor: Change response for publish all grades * refactor: Use update_all instead of recursively updating individual submissions * feat: Implement unpublish all grades route * feat: Implement unpublish_all * feat: Implement unpublish_all tests * chore: Format * feat: Implement auto publish for mcq/voting questions * feat: Implement auto publish for auto graded programming questions * chore: Fix consistency issue * feat: Implement published and unpublished notifications and remove deprecated ones * feat: Include isGradingAutoPublished in response for assessment configs * fix: Include sending of notifications when publishing/unpublishing all * docs: Add docs for functions implemented * chore: Update wording for tests * chore: Remove unused variables * feat: Implement test for unpublish and publish all routes * feat: Implement guard for publish/unpublish grades This commit prevents admin/staff from individually publishing/unpublishing grades for students. * refactor: Change notification types in swagger_schema * chore: Add comment in seed * refactor: remove redundant lines * Redate migrations Ensures total ordering of migration files are preserved. * Revert unnecessary changes * Revert more unnecessary changes * refactor: Move duplicate code into helper function * chore: Fix typo * refactor: Change control flow structure --------- Co-authored-by: YaleChen299 <[email protected]> Co-authored-by: Richard Dominick <[email protected]> Co-authored-by: GabrielCWT <[email protected]>
- Loading branch information