CSC/ECE 517 Fall 2017/E1788 OSS project Maroon Heatmap fixes

From Expertiza_Wiki
Revision as of 16:30, 21 October 2017 by Knielar (talk | contribs)
Jump to navigation Jump to search

Background

Expertiza is a Ruby on Rails based Open Source project. It is a collaboration tool which lets users with different roles (student, instructor, teaching assistant) to collaborate on a course in an institution. A collaboration could be for an assignment where students teams up for an assignment and instructors grades them on the basis of their submission. Students could review other's works and give feedbacks as well.


Problem Statement

What it does:

Heatgrid is the view which summarizes all the reviews given for the work of a participant (reviews, author feedbacks and meta reviews) on a singular web page so that an instructor can go through all the feedback given to a student and decide their grade. The columns are sortable by their score, criterion, average score for a criterion or a metric. (number of comments with more than 10 words) What’s wrong with it: app/views/grades/view_team.html.erb is a fairly complex for a view. It uses the concept of view models to generate the required tables. When multiple rounds of reviews are displayed on the heatgrid, a bug prevents the second round of the reviews from being sorted by their criteria, average score, or the metric mentioned above.

What needs to be done:

Problem 1.

Find out what’s preventing the reviews in the second round from being sorted by a criterion, average score or the metric even though same code is used for first and second round of the reviews.

Problem 2.

Come up with a design that can be used for all the rounds of reviews and implement it.

Problem 3.

1. TAs should only be able to view the heatgrid of students for the assignments in courses for which they’re TAs for.Nor should a TA’s homepage list any courses (s)he is not a TA for.

2. Improve the Access Control and allow the TAs of that particular course to view the heatgrid for the participants of that particular course.

[Also see https://github.com/expertiza/expertiza/issues/720 And https://github.com/expertiza/expertiza/issues/732 ]


Files modified

For Problem 1 & Problem 2.

File 1. app/assets/javascripts/view_team_in_grades.js

File 2. app/views/grades/view_team.html.erb


For Problem 3.

File 1. app/controllers/tree_display_controller.rb


Issue and Solution

Problem 1

For all the tables on the page which had each round's data, html component table was given same id which was only allowing only first table to have the sorting properties.

Problem 2

We assigned a unique id to all tables based on the round number and included a class "scoresTable" for each table and initialised sorting features based on class.

Problem 3

We found that for a teaching assistant, if he/she is not a TA of a course, private field of tmp_object was assigned false value. So, by adding only true values in the resource object returned for the TA, ensured that only courses in which he/she is TA of will be sent back to the view.