CSC/E1869 GRADING AUDIT TRAIL: Difference between revisions
No edit summary |
No edit summary |
||
Line 109: | Line 109: | ||
Actual view for review grade record | Actual view for review grade record | ||
[[File:E1869-Actual-4.png]] | [[File:E1869-Actual-4.png]] | ||
===Actual Code Change=== | |||
==Files Added== | |||
*app/models/grading_history.rb | |||
*app/controllers/grading_history_controller.rb | |||
*app/views/grading_history/index_html.erb | |||
==Files Modified== | |||
* app/controllers/grades_controller.rb | |||
'''Add code to call methods in grading_history_controller.rb to create new grading history | |||
def save_grade_and_comment_for_submission | |||
participant = AssignmentParticipant.find_by(id: params[:participant_id]) | |||
@team = participant.team | |||
@team.grade_for_submission = params[:grade_for_submission] | |||
@team.comment_for_submission = params[:comment_for_submission] | |||
begin | |||
+ GradingHistory.create(instructor_id: session[:user].id, | |||
+ assignment_id: participant.assignment.id, | |||
+ grading_type: "Submission", | |||
+ grade_receiver_id: @team.id, | |||
+ grade: @team.grade_for_submission, | |||
+ comment: @team.comment_for_submission) | |||
@team.save | |||
rescue StandardError | |||
flash[:error] = $ERROR_INFO | |||
end | |||
redirect_to controller: 'assignments', action: 'list_submissions', id: @team.parent_id | |||
end''' | |||
* 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''' | |||
=='''Reference'''== | =='''Reference'''== | ||
[https://expertiza.ncsu.edu/ Expertiza] | [https://expertiza.ncsu.edu/ Expertiza] |
Revision as of 04:19, 8 December 2018
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 will create a database called grading_history in the system contains elements instructor id, assignment id, grade type, student id, grade, comment, and timestamp.
We will use 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 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 submission record in the system.
We also need to modified grades controller, so that every time, a grade is submitted or edited, grading_history_controller.rb will call a method to create a entry saves into database.
Expected View
Expected view for submission list
Expected view for review report
Expected view for grade record
Diagram
Files Changed
Files Added
- app/models/grading_history.rb
This is a model for grading audit trail, containing attributes of grading history
- app/controllers/grading_history_controller.rb
This is a controller for grading audit trail, it can add grading history into the system
- 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
Files Modified
- app/controllers/grades_controller.rb
Add code to call methods in grading_history_controller.rb to create new grading history
- 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
Testing Plan
Functional testing:
For “Review grade”:
1.Log in as instructor
2.Navigate to Manage -> Assignments
3.Click on Review Report
A report with following details will show up: Timestamp, Instructor Id, Assignment id, Grade type, Student id, Grade, Comment
4.Every time an instructor edits or comments on the grade the report is updated with the new entry and timestamp.
For “Submission grade”:
1.Log in as instructor
2. Navigate to Manage -> Assignments
3.Click on View Submission -> History
A report with following details whill show up: Timestamp, Instructor Id, Assignment id, Grade type, Student id, Grade, Comment
4.Every time an instructor edits or comments on the grade the report is updated with the new entry and timestamp.
Actual Implementation
Actual View
Actual view for submission list
Actual view for submission grade record
Actual view for review grade record
Actual Code Change
Files Added
- app/models/grading_history.rb
- app/controllers/grading_history_controller.rb
- app/views/grading_history/index_html.erb
Files Modified
- app/controllers/grades_controller.rb
Add code to call methods in grading_history_controller.rb to create new grading history def save_grade_and_comment_for_submission participant = AssignmentParticipant.find_by(id: params[:participant_id]) @team = participant.team @team.grade_for_submission = params[:grade_for_submission] @team.comment_for_submission = params[:comment_for_submission] begin + GradingHistory.create(instructor_id: session[:user].id, + assignment_id: participant.assignment.id, + grading_type: "Submission", + grade_receiver_id: @team.id, + grade: @team.grade_for_submission, + comment: @team.comment_for_submission) @team.save rescue StandardError flash[:error] = $ERROR_INFO end redirect_to controller: 'assignments', action: 'list_submissions', id: @team.parent_id end
- 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