E1934 - Grading Audit Trail: Difference between revisions
(7 intermediate revisions by 4 users not shown) | |||
Line 16: | Line 16: | ||
===Design=== | ===Design=== | ||
We | We 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. | ||
We | We used MVC design to create a model, a controller, and a view for both of '''Review Grade''' and '''Submission Grade'''. | ||
:Model: grading_history.rb. Has a list of attributes contains instructor id, assignment id, grade type, student id, grade, comment, and timestamp. | :Model: grading_history.rb. Has a list of attributes contains instructor id, assignment id, grade type, student id, grade, comment, and timestamp. | ||
Line 24: | Line 24: | ||
:View: index_html.erb. Displays current submission or review's grading history. An existing example of this is a submission record in the system. | :View: index_html.erb. Displays current submission or review's grading history. An existing example of this is a submission record in the system. | ||
We | We modified 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. | ||
===Expected View=== | ===Expected View=== | ||
Line 52: | Line 52: | ||
3. Test if GradeHistory.where is being called when grading history button is clicked. | 3. Test if GradeHistory.where is being called when grading history button is clicked. | ||
spec/controllers/grading_histories_controller_test.rb | spec/controllers/grading_histories_controller_test.rb | ||
Feature Testing: | |||
1. Test if the grading history is visible and shown in chronological order | |||
spec/features/grade_histories_spec.rb | |||
spec/features/helpers/grade_histories_helper.rb | |||
===Code Changes=== | ===Code Changes=== | ||
==Files | ==Files Modified== | ||
*app/controllers/grades_controller.rb | *app/controllers/grades_controller.rb | ||
''' | ''' | ||
Line 72: | Line 79: | ||
''' | ''' | ||
* app/views/ | * app/views/reports/_review_report.html.erb | ||
''' | ''' | ||
Add code to support view changes for Grade Record | Add code to support view changes for Grade Record | ||
''' | ''' | ||
==Files | ==Files Added== | ||
*app/controllers/grading_histories_controller.rb | *app/controllers/grading_histories_controller.rb | ||
''' | ''' | ||
Calls the grading history view after | Calls the grading history view after validating Submission and Review Type. | ||
''' | ''' | ||
Line 104: | Line 111: | ||
''' | ''' | ||
This is a view for grading audit trail, it will display all grading histories of a submission/review | This is a view for grading audit trail, it will display all grading histories of a submission/review | ||
''' | |||
*spec/features/grade_histories_spec.rb | |||
''' | |||
Feature test to check if the grades appear in chronological order | |||
''' | |||
*spec/features/helpers/grade_histories_helper.rb | |||
''' | |||
Helper file to facilitate the above mentioned feature test. | |||
''' | ''' | ||
Line 110: | Line 129: | ||
[http://wiki.expertiza.ncsu.edu/index.php/CSC/E1869_GRADING_AUDIT_TRAIL Previous Project Documentation] | [http://wiki.expertiza.ncsu.edu/index.php/CSC/E1869_GRADING_AUDIT_TRAIL Previous Project Documentation] | ||
[https://youtu.be/yyxX_kRYxLc Screencast] | |||
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza_wiki] | [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza_wiki] |
Latest revision as of 14:28, 1 May 2019
Introduction
Problem Statement
After an instructor gave a grade to an assignment, there is no way to track who gave the grade. A grading audit trail must be created and the following information needs to be stored:
- 1. When a grade is assigned by an instructor, there needs to be an indication of who did it and when it was done.
- 2. Comments previously provided by other instructors must also be preserved.
This information needs to be stored every time an instructor edits a grade/comment and clicks the save button.
Currently, there are two places need to add grading audit trail:
- 1. Review grade: Log in as instructor -> Manage -> Assignments -> View Review Report
- 2. Submission grade: Log in as instructor -> Manage -> Assignments -> View submissions
Proposed Solution
Design
We 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.
We used MVC design to create a model, a controller, and a view for both of Review Grade and Submission Grade.
- Model: grading_history.rb. Has a list of attributes contains 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.
We modified 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.
Expected View
The list submission page with the new "grade history" option
The review report page with the new "grade history" option
Grade history for a given team
Diagram
Testing Plan
Functional testing:
1. Test if SubmissionGradeHistory.create is being called when a submission grade is changed.
spec/controllers/grades_controller_spec.rb
2. Test if ReviewGradeHistory.create is being called when a submission grade is changed.
spec/controllers/review_mapping_controller_spec.rb
3. Test if GradeHistory.where is being called when grading history button is clicked.
spec/controllers/grading_histories_controller_test.rb
Feature Testing:
1. Test if the grading history is visible and shown in chronological order
spec/features/grade_histories_spec.rb spec/features/helpers/grade_histories_helper.rb
Code Changes
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/reports/_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
- spec/features/grade_histories_spec.rb
Feature test to check if the grades appear in chronological order
- spec/features/helpers/grade_histories_helper.rb
Helper file to facilitate the above mentioned feature test.