CSC/ECE 517 Fall 2021 - E2164. Heatgrid fixes and improvements

From Expertiza_Wiki
Jump to navigation Jump to search

Project Background

Heatgrid is the page where instructor can visit and view the work done by participant using Reviews, Author Feedbacks and Meta Reviews. This one web page displays all the evaluations done by peers of the participant for his project. The page is displayed in the format of table with colors. The columns in the table can be sorted with the requirement of the project. Heatgrid shows scores assigned by reviewers on individual rubric items for participant.

What is wrong with it

It is called from Instructor's "Assign Grades" function and student's view scores functions. But, there is an issue where the students can review their own assignments. However, win the databases (old database) we were provided with do not have any student with Student id: 9277, and the assignment Madeup Problem 3 hasn't even existed. Also, the column name "metric-1" in the heatgrid is not self-explanatory and needs to be changed.

Issue 2019

Problem Definition

When an instructor is trying to Assign a Grade for student 9277, he/she is not able to see Reviews for Round-1. However, we were not able to reproduce the same issue, as the student with id-9277 does not exist in our database.

Current Implementation

Overview

In the current review system implementation, the instructor has the ability to select or deselect the "Allow Self Reviews?" checkbox from the "Review Strategy" tab of the Edit Assignment page. On deselecting this checkbox, a student will not be able to review his/her own work.

UI Screenshots

The following images show how this functionality works currently:

The instructor will get the error "You cannot assign this student to review his/her own artifact." when an attempt to add a student as a reviewer to his/her own assignment is made.

Control Flow


Observations

Whenever an instructor assigns a reviewer for an assignment of a team, there is already a check present and it is not allowing instructor to assign the team member of the team for the review.

Test Plan

  • If the "Allow Self Review?" checkbox is disabled, then the reviewer should not be able to review their own assignment.
  • If the "Allow Self Review?" checkbox is enabled, then the reviewer should be able to review their own assignment.
  • Files to be Targeted

  • app/controllers/grades_controller.rb:- Focussing on self-review and grades section.
  • app/views/_review_strategy.html.erb:- Here, the checkbox of "Allow Self Review?" is written.
  • app/helpers/grades_helper.rb:- Grades helper file.
  • spec/controllers/review_mapping_controller.rb:- Adding test cases for checking whether the reviewer can self-review if the "Allow Self Review?" checkkbox is disabled and the vice-versa too.
  • Issue 1869

    Problem Definition

    Notes that there is a “metric-1” column in the review report, but it doesn’t say what the metric is. Please figure out what the metric is, and change the column header accordingly. However, the intent was that eventually an instructor would be allowed to select a metric to be shown on the heatgrid. So, somewhere in the UI for creating/editing an assignment, there should be a way for the instructor to select a metric from a dropdown list. You don’t have to add any more metrics to this list other than the one that is currently displayed, just create a mechanism for adding metrics in the future.

    Current Implementation

    Overview

    In the current implementation, the columns in the heatgrid table are static. The "metric-1" column in the table represents the count of comments for the respective question which have a word count greater than 10. On hovering over the column name, the correct information is displayed but the name itself does not make the information apparent at first glance.

    UI Screenshots

    The following image captures how the heatgrid is currently being displayed:

    Plan of work

    Implementation Details

    • In the view_team.html.erb and _view_heatgrid.html.erb, instead of pre-assigned value to be metric-1, a dropdown will be populated and the instructor can choose the metric for the review. By default in the dropdown, there will be only one metric to count the number of words > 10.
    • In the grades_helper.rb, there is a view_heatgrid() function, in which only the number_of_words_greater_than_10 method is called, now instead of that, a dictionary will be assigned which will call the method on the basis of the review metric selected by the instructor.
    • Now, if the instructor wants to add any new metric, he/she just need to add the method for the metric in the vm_question_response.rb file and a new key-value mapping for that particular method needs to be added to the dictionary.

    Proposed Control Flow

    Detailed Implementation

    • app/views/assignments/edit/_general.html.erb:- In this file we have added the dropdown which takes the metric from the instructor and sets the metric accordingly. The code we added is mentioned below:-
    <tr>
        <td style='padding:5px' id='assignment_metrics_field'>
        <%= label_tag('assignment_form[assignment][heatgrid_metric]', 'Select a Metric to be displayed in the Report Heatgrid:') %>
        <%= select('assignment_form[assignment]', 'heatgrid_metric', [['--', ''], %w[Verbose-Comment-Count countofcomments]], 
        { :selected => @assignment_form.assignment.heatgrid_metric}, { :class => 'form-control', :style => 'width: 100px'}) %>
        </td>
    </tr>
    

    We have added assigned two values to the dropdown:- '--' and 'Verbose-Comment-Count'. This is how it looks after adding this dropdown on the expertiza:-



    • app/views/grades/view_team.html.erb:- In this file, there is a view for the heatgrid, so when the instructor clicks on Assign Grades, the view from this file is rendered. So, the column name is changed here from "metric-1" to "countofcomments" variable, which will take the store the value of the dropdown selected.

    Test Plan

  • Capybara Test cases for the heat grid view and team view should be added to check if the dropdown is visible as expected.
  • Spec test cases should be added for the grades controller should be added to verify the responses returned from the controller.
  • Unit test cases will be added to verify the logic of the number_of_comments_greater_than_10_words method of the vm_question_response model.
  • Important Links

    Team

    • Shlok Sayani (sdsayani)
    • Hardik Udeshi (hvudeshi)
    • Isha Gupta (igupta)
    • Manish Shinde (msshinde)