CSC/ECE 517 Fall 2021 - E2158. Grading audit trail

From Expertiza_Wiki
Jump to navigation Jump to search

Problem Definition

After an instructor gave a grade to an assignment, there is no way to track who gave the grade. Any instructor can assign/edit a grade freely. There is no way of tracking who did it.

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

The grading audit trail can probably be implemented as the submission records history on Expertiza. The required 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.

Previous Implementation

Links

Previous Wiki Page

Screencast


Review

1. Review grade part in the previous implementation served well, we only need to fix some UI issues in the current implementation;
2. But for Submission grade part, we need to add a table in order to save submission history including the instructor id, assignment id, student id, grade, comment, and timestamp.

Issues with Previous Work

1. For review grades, the “Grading History” link must not be in a separate column. It should be in smaller text below in the “Save” button.
2. In the view grading record page, remove the receiver column and add it to the title.
3. Restrict the column width on the grading record page.
4. Add comments on list_submissions.html.erb to indicate that the alignment was changed to fix code climate issues.
5. Revert changes made to list_review_mapping.html.erb.
6. Remove the review_report-html.erb file.

Proposed Solution

Expected View







History of Comment and Grade for Reviews

In this part, we will modify the current view of review page, to add the link "history" to a proper place as the expected design picture shows.

The related table from databases is review_scores. The ER table of review_scores is shown as below.

Review History Flow

History of Comment and Grade for Submissions

In Expertiza, we find the fields related to grade and comment are located in the model team, which is only able to be overwritten. Since there is no table to store the history of the comment and score given by instructors and TAs, we need to do:

1. Review the related implementation of previous work in order to evaluate and understand the process of adding new models.
2. Implement the related Model, View and Controller:
  • Model: grading_history.rb
  • Controller: grading_history_controller.rb
  • View: related pages.

Because in Expertiza the team ID will be generated for each given assignment, so the original design of grade / comment of team's submission are the field belongs to team. So our model uses the foreign key to only the team but not the related assignments or submissions.

The expected class of grading history could be shown as:

Team History Flow

Testing Plan

Rspec Unit Tests

For History of the Grade of Reviews

The history of the grade and comments are related to this controller app/controllers/review_mapping_controller.rb and this view app/views/reports/_review_report.html.erb.

So the related RSpec tests are planned to be executed:

   spec/controllers/review_mapping_controller_spec.rb

For History of the Grade of Team Submissions

The history of the grade and comments are related to the new model grading_history.rb and the new controller grading_history_controller.rb.

So the related RSpec tests are planned to be executed:

   spec/models/grading_history.rb
   spec/controllers/grading_history_controller.rb

For the feature part, test if the grading history and instructor can be shown in chronological order:

   spec/features/grade_histories_spec.rb
   spec/features/helpers/grade_histories_helper.rb

Manual UI Tests

To start the test, we need to log in as instructor or TA first. These accounts should have access to the assignment. For example: we can use intructor6/password or teaching_assistant8631/password;

Scenario 1: Grading histories of reviews

Step 1. Log in as instructor/TA -> Manage -> Assignments -> View submissions


Step 2.

Scenario 2: Grading histories of submissions

Step 1. Log in as instructor/TA -> Manage -> Assignments -> View Reports


Step 2.

Important Links

  1. Git Repo
  2. Pull Request

Team

Mentor: Xiao, Kai (yxiao28)

Yao, Kaiyong (kyao)

Hou, Guanyu (ghou3)

Du, Haoze (hdu5)

Du, Liwen (ldu2)