CSC/ECE 517 Spring 2021 - E2113. Enhancements to review grader

From Expertiza_Wiki
Jump to navigation Jump to search

Background

Most of the projects and assignments in CSC517 and on Expertiza are peer-reviewed, and these peer-reviews are graded by the teaching staff. When the staff grade reviews, they are viewed in the review-grader interface. The staff can assign the score and provide feedback using the textboxes provided in the right columns of the table. The staff are also allowed to read the reviews in the summary view.

There appears to be certain sections of the main review-grader page as well as the summary page that are not working correctly or there is a desire for them to be updated. These issues have to do with calculation of a student's score / average score, the visual representation of the scores, efficient usage of space within the view, and a need for rows of the table(s) to be numbered. We go into further depth about the issues later in this document.

The Project

Certain aspects of the UI and minor score calculation logic of the review grader system in Expertiza need to be enhanced/refactored. These issues are not major and mainly have to do with UI, and therefore should not require the development of new unit tests. Below is a detailed description of actionable issues that will be addressed in this work.

The Main Review-Grader Page

Issue Description

  1. This project eventually morphed into a bug-fixing and beautification project. There were some serious inconsistencies, bugs, and syntax issues with the beta branch review grader section. These were found and solved to the best of our ability.
  2. Fix the “Score awarded/average score” column so that it is populated with the correct numbers. It is supposed to report the score by the current student reviewer in the first round, the average score by all reviewers in the first round, and ditto for the second round. If the number of rounds ≠ 2, then the number of scores should be adjusted appropriately.
    1. There is a bug having to do with "Avg. score" not being calculated sometimes, like when the team that was reviewed should definitely have an average score to be displayed, even if the current student reviewer did not complete the review. This bug will have to be examined further.
  3. Number the rows of the table (e.g., “2. Student 8370”) so it is easy to count the lines. This will help assign each TA (and the instructor) an equal number of reviews to grade.

Design Strategy

  1. The "Scores" issue. Unfortunately, this task was more complicated than we originally believed. The team was advised to try to find out as much as possible about the bug, and fix it if possible, but it involves many different classes within Expertiza.
    1. The variable @avg is computed in the file app/models/answer.rb, and is initially set to nil if an assessment is not present. The variable @avg is also set to a placeholder "----" in the file app/helpers/review_mapping_help.rb. If "@avg_and_ranges[team_id][round][metric]" is not nil, the "@avg" will be set to the average scores. The "@avg_and_ranges" is set to the result returned by method compute_avg_and_ranges_hash in method "review_response_map" in file "app/helpers/report_formatter_helper.rb". The method "compute_avg_and_ranges_hash" is defined in file "app/models/on_the_fly_calc.rb".
    2. The "Score awarded/average score" column in the table is actually composed of two rendered partials: views/reports/_team_score.html.erb and views/reports/_team_score_score_awarded.html.erb. Within these partials, the method get_awarded_review_score is called, which is defined in the /helpers/review_mapping_helper.rb helper file (line 138). It is within this helper file that the @avg instance variable is also defined. It appears as though the previous team spent some time tracking down the source of the bug in the presentation of the "Avg. score" in the table, but were unable to fix it.
    3. The @avg instance variable is defined in the method get_review_volume, found in line 152 in /helpers/review_mapping_helper.rb - however, in the beta branch, the method that is called within views/reports/_team_score.html.erb and views/reports/_team_score_score_awarded.html.erb is called get_review_metrics. It appears this error is not present in the master branch of Expertiza.
    4. Another issue with the scores was that a "nil" value was showing - this issue was simply due to a forgotten check that needed to be added into the app/views/reports/_team_score.html.erb.
  2. In the _review_report.html.erb file, Line 61, we need to replace the 'each' method with 'each_with_index' to make sure that all rows are indexed. In line 69 add a line to display the index number and make sure that the value of the variable must be index+1, since the values are zero indexed

Design Pattern

This project mainly focuses on the UI, so no specific GoF design pattern is particularly being considered. Comments will be added where deemed necessary to further illuminate the functionality of the code. If needed, (if new methods/classes/views are added) this will be updated to reflect those changes.

The Summary Page

Issue Description

  1. Checkbox items take up far too much space. Remove duplicated header lines and show just columns of checkboxes to the right of the “questions.” Also, it is unnecessary to prefix each by “[Question]”.
  2. Adjust column width intelligently. The “Reviewee” and “Score” columns are much wider than necessary. The “Comments” column is also too wide for easy reading. So consider how the page might be reorganized to take better advantage of the available space. One option might be to show the comments vertically, astride each other, rather than horizontally, above and below each other. Mock up your proposal and discuss it with your mentor.
  3. Get rid of “Review: Round1”. It should be, “Review Round 1”

Design Strategy

  1. To get rid of the duplicated header lines, we will modify view_review_scores_popup.html.erb either by implementing comments vertically, astride each other or by displaying the header columns only once. To tackle the problem of Checkbox items taking up too much space we plan to implement the following mock up."[Question]" would be deleted.

Original :

Mock_up:

  1. Concerning column width, we will play around the preset width in /app/views/popup/view_review_scores_popup.html.erb, the previous team went with 10% for "Reviewee", 5% for "Score" and it looks reasonable.
  2. "Review Round" header is located at /app/models/review_response_map.rb, and can be easily modified by adding white space.

Files to be Viewed/Modified

Below is a rough list of files that we estimate this particular action item will involve:

  1. /app/views/popup/view_review_scores_popup.html.erb
  2. /app/models/review_response_map.rb
  3. /app/assets/stylesheets/grades.scss

Test Plan

Most of the changes in this project are UI focused. Due to this, most of the testing was done via manual functionality testing. However, because of the changes in review_mapping_helper.rb, we did have to make changes to the review_mapping_helper_spec.rb file in order to reflect this. The code diff is shown below, and the process for manual testing is also displayed.

According to Expertiza Bot, our code test coverage increased by 3.6%.


Just for reference- The processes for testing accessing the review reports:

Testing Review Grader View

  1. Login using an instructor account, such as: instructor6 / password
  2. Go to "Manage >> Assignments" and choose one assignment with reviews, i.e., "Program 1", and click on "View Reports".
  3. There will be a dropdown selector to choose which report to view - select "Review report" from the dropdown, and click "View".
  4. Check to make sure that the "Avg. score" for reviewed assignments is being shown correctly.
  5. Check if column widths are appropriate. Make sure the text "Score awarded / Avg. score" instead reads "Score / Avg. score".
  6. Verify the bar graph display of scores.


Modifications

The Main Review-Grader Page

Files Modified

Below is a rough list of files that we estimate this particular action item will involve:

  1. /app/helpers/review_mapping_helper.rb
  2. /app/views/reports/_review_report.html.erb
  3. /app/views/reports/_team_score.html.erb

Review Mapping Helper

The review mapping helper is a module that is used extensively throughout the peer review system in Expertiza to perform a number of things (perhaps too many) including calculating scores, finding team colours, preparing grade data visuals, and other useful computations. In this project, we wanted to fix the inconsistencies between the beta and master branch with specific regard to the get_review_volume() and get_review_metrics() method. These performed the same computation, yet get_review_metrics was called but not defined in the beta branch. This was fixed, and the code diff is presented below. The comments were added later, and a separate picture is shown below.

Comments:

Review Report View

The addition of indices to each of the reviews for this assignment was a simple fix. Replacing each with each_with_index and printing to HTML solves the issue.

Team Score

This is a partial HTML that is rendered within the Review Grader view. Changes were made to it to reflect that changes made to get_review_metrics, and the diff is shown below.

The Summary Page

Files Modified

Below is a rough list of files that we estimate this particular action item will involve:

  1. app/views/popup/view_review_scores_popup.html.erb
  2. app/assets/stylesheets/grades.scss
  3. app/models/review_response_map.rb

New Look Summary Page

Issues Fixed

  • We decided to fix all of our issues with summary page like columns taking too much width, header texts like "Reviewee" and "Score" repeated unnecessarily by reorganizing the page to take better advantage of the available space. We placed the questions vertically, astride each other, rather than horizontally.
  • "Scores" and "comments" column were merged together for aesthetic reasons and to improve readability. The scores are displayed with a colorful background indicating its value.

Before Modification

After Modification

  • “Review: Round1” was changed to “Review : Round1”. Also the title "Review scores: student5061" was changed to "Review scores by student5061" as its more indicative as a title.

Before Modification

After Modification