CSC/ECE 517 Fall 2022 - E2285. Grading audit trail
Team Introduction
Team Member
Zanxiang Wang (zwang236@ncsu.edu)
Nikhil Mehra (nmehra2@ncsu.edu)
Brian Davis (bbdavis4@ncsu.edu)
Mentor
Not Assigned
Problem Description
A grading audit trail must be created and the following information needs to be stored:
- When an instructor assigns a grade, there needs to be an indication of who did it and when it was done.
- Comments previously provided by other instructors must also be preserved.
This information must be stored every time an instructor edits a grade/comment and clicks the save button.
The grading audit trail can probably pattern off the submission records history (shown below) on expertiza.
The below page can be reached by logging in as instructor -> Manage -> Assignments -> View Submissions -> History
At the minimum, a grading log entry must include the instructor id, assignment id, student id, grade, comment and timestamp.
Prior Work
The team created a database called grading_history in the system which stores elements of instructor id, assignment id, grade type, student id, grade, comment, and timestamp.
They used the MVC design to create a model, a controller, and a view for both Review Grade and Submission Grade.
- Model: grading_history.rb. Has a list of attributes containing instructor id, assignment id, grade type, student id, grade, comment, and timestamp.
- Controller: grading_history_controller.rb. Saves a new entry into the database every time a review grade or submission grade is saved
- View: index_html.erb. Displays current submission or review's grading history. An existing example of this is a submission record in the system.
They also modified the grades controller, so that every time, a grade is submitted or edited, grading_history_controller.rb will call a method to create an entry saves into the database.
https://www.youtube.com/watch?v=yyxX_kRYxLc
General Design Plan
Preliminary: The previous iterations of the project fulfilled all the functional requirements of the "grading audit trail" feature, but it is four years old and the pull requests never merged. Thus, the changes are outdated and cause build issues with the latest Expertiza.
1. Cherry pick and manually fixup the changes from previous iterations to fix build issues.
2. Cleanup GUI so it meshes cleanly with latest Expertiza.
3. Add comments and test cases.
Expected View
Audit_Trail_2.png Audit_Trail_3.png
Flow Chart
Testing Plan
Functional testing:
1. Test SubmissionGradeHistory.create: call a submission grade when changed.
spec/controllers/grades_controller_spec.rb
2. Test ReviewGradeHistory.create: call a submission grade when changed.
spec/controllers/review_mapping_controller_spec.rb
3. Test GradeHistory.where: called when grading history button is clicked.
spec/controllers/grading_histories_controller_test.rb
Feature Testing:
1. Test the grading history: visible and shown in chronological order?
spec/features/grade_histories_spec.rb spec/features/helpers/grade_histories_helper.rb
Files Modified
- app/controllers/grades_controller.rb
Creates a Grading History Record for every Submission grade edited by the instructor for a Team.
- app/controllers/review_mapping_controller.rb
Creates a Grading History Record for every Review grade edited by the instructor for a Student.
- app/views/assignments/list_submissions.html.erb
Add code to support view changes for Grade Record
- app/views/review_mapping/_review_report.html.erb
Add code to support view changes for Grade Record
Files Added
- app/controllers/grading_histories_controller.rb
Calls the grading history view after validating Submission and Review Type.
- app/models/grading_history.rb
Model for Grading History.
- app/models/review_grading_history.rb
Model containing specifics of Review Grading History. Inherits Grading History.
- app/models/submission_grading_history.rb
Model containing specifics of Submission Grading History. Inherits Grading History.
- app/views/grading_history/index_html.erb
This is a view for grading audit trail, it will display all grading histories of a submission/review