CSC/ECE 517 Fall 2021 - E2165. Fix teammate-review view: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
Line 99: Line 99:
== Present Status of the application ==
== Present Status of the application ==


'''Image 1. Instructor's view of teammate review'''
'''Image 1. Instructor's view of teammate review''': This is the current screen given to the instructor. Here we see that the instructor can not determine who has given which review to which student.
 
[[File:Instructor-view-1.png|border|center|alt=The proposed expanded student display.|The proposed expanded student display.]]
[[File:Instructor-view-1.png|border|center|alt=The proposed expanded student display.|The proposed expanded student display.]]


This is the current screen given to the instructor. Instructor can not determine who has given which review to which student.


'''Image 2. Student's view of teammate review'''
'''Image 2. Student's view of teammate review''': Currently, a student is not able to see what grades were given by their teammates. We need to implement that functionality so that the student is able to view the grades.
 
[[File:Student-view-2.png|border|center|alt=The current instructor view.|The current review display for instructors.]]
[[File:Student-view-2.png|border|center|alt=The current instructor view.|The current review display for instructors.]]


Currently, student is not able to see what grades were given by their teammates. We need to implement that functionality so that the student is able to view the grades.


'''Image 3. UML Diagram'''
'''Image 3. UML Diagram''': We are planning to add two variables namely showTeammateReview and hideReviewerName. showTeammateReview will decide whether the students would be able to view their team members reviews. hideReviewerName will decide whether the student is able to view peer's names or not.
[[File:Uml-assignment.png|border|center|alt=The proposed condensed student display.|The proposed condensed student display.]]
[[File:Uml-assignment.png|border|center|alt=The proposed condensed student display.|The proposed condensed student display.]]
We are planning to add two variables namely showTeammateReview and hideReviewerName. showTeammateReview will decide whether the students would be able to view their team members reviews. hideReviewerName will decide whether the student is able to view peer's names or not.




== Proposed changes ==
== Proposed changes ==


1)
1)''' Proposed UI for instructor ''': The instructor is able to see the score for all teammates. In the existing code, only one teammate's scores are being shown. But, we are planning to change the way the VmQuestionResponse array is created, so that the scores for all teammates are appended to it so it correctly shows what should have already been shown in this screen for the instructor.
 
''' Proposed UI for instructor '''


[[File:Proposed_screen.png|border|center|alt=Proposed UI for instructor|Proposed UI for instructor.]]
[[File:Proposed_screen.png|border|center|alt=Proposed UI for instructor|Proposed UI for instructor.]]


The instructor is able to see the score for all teammates. In the existing code, only one teammate's scores are being shown. But, we are planning to change the way the VmQuestionResponse array is created, so that the scores for all teammates are appended to it so it correctly shows what should have already been shown in this screen for the instructor.


Note: When a student visits this screen, they will only be shown the reviews received by them, assuming the instructor has allowed visibility of teammate reviews to students.
Note: When a student visits this screen, they will only be shown the reviews received by them, assuming the instructor has allowed visibility of teammate reviews to students.




2)
2)''' Error in existing UI for student ''': In the existing UI for a student, the highlighted block should not be rendered. This part of the screen is meant for the instructors/TAs. This portion of the screen being rendered to a student is a mistake, and we will remove this part of the screen from the student's screen as part of our proposed changes.


''' Error in existing UI for student '''
[[File:Wrong render for student.png|border|center|alt=Existing UI for student|Existing UI for student.]]


[[File:Wrong render for student.png|border|center|alt=Existing UI for student|Existing UI for student.]]


In the existing UI for student, the highlighted block should not be rendered. This part of the screen is meant for the instructors/TAs. This portion of the screen being rendered to a student is a mistake, and we will remove this part of the screen from the student's screen as part of our proposed changes.


3)
3)''' Show teammate review to student UI ''': The existing code doesn't render a student's teammate review scores at all. We are planning to render the scores to a student when they visit this screen. However, the visibility of this screen is contingent on whether the instructor has allowed visibility of the teammate review screen to students. If the instructor has disabled this feature, then the heatgrid will not be displayed at all.


''' Show teammate review to student UI '''


[[File:UI_for_student.png|border|center|alt=New UI for students|New UI for students ]]
[[File:UI_for_student.png|border|center|alt=New UI for students|New UI for students ]]
The existing code doesn't render a student's teammate review scores at all. We are planning to render the scores to a student when they visit this screen. However, the visibility of this screen is contingent on whether the instructor has allowed visibility of the teammate review screen to students. If the instructor has disabled this feature, then the heatgrid will not be displayed at all.


== Design Patterns ==
== Design Patterns ==

Revision as of 01:32, 9 November 2021

Team Introduction

Dr. Edward Gehringer (instructor), Parimal Mehta (mentor)

1. Lalit Bangad (unity ID: llbangad)

2. Vinay Deshmukh (unity ID: vdeshmu)

3. Arvasu Chikara (unity ID: achikar2)

4. Anjali Garg (unity ID : agarg25)


Problems to be addressed

After a project is submitted and reviewed, both the team members (students) and instructors should be able to view the teammate reviews. Students should be able to view the reviews by going to a particular assignment's -> your scores, at the bottom of the page. An instructor can view the teammate reviews by going to assignments -> assignment -> particular team's submission -> view submission -> assign grades -> view scores.

In the case of the instructor, a single heat grid is shown whereas in the case of a team member, we cant view the scores. In the heat grid, it is not clear if the scores visible are for the reviews that the student has *written* for their teammates or the scores that the student has *received* from their teammates. Additionally, for instructors can choose from a list of the students on the team, but they have no way to tell whether the heat grid shows the reviews done *by* that student or done *for* that student.

Methodology Overview

We have divided our work in the following tasks to address the above problems:

1. Distinguish reviews done for a student by rendering separates heatgrids for each student

2. For instructors, the table will have sections based on the students

3. Include a checkbox on the edit assignment page that enables/disables visibility of heat grid to students

4. Fix the average column for a table (which breaks for some reviews)

5. Show a composite score derived from all reviews. Make this code generalized, so other kinds of heat grid views could use it.

6. Changes should work even in an anonymized view

Motivations

1. Enable users to clearly tell which reviews are done by them, and which reviews are done for them.

2. Code should be generic so it can be used for different types of heat grids as well.

Control Flow to access the concerned screens

Models used / Explanation of fixes

Flow diagram of proposed changes for showing team review data to instructor

The above diagram illustrates the proposed code change for showing all team members with the teammate review data to an instructor.

The existing code only iterated on the `Participant` whose ID is present in the URL of the page. To fix this, we will iterate over all teammates of the given participant so that all teammate reviews for all team members are shown to the instructor.


Existing code: ```

   questionnaires.each do |questionnaire|
     @round = nil
     if @assignment.vary_by_round && questionnaire.type == "ReviewQuestionnaire"
       questionnaires = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id)
       if questionnaires.count > 1
         @round = questionnaires[counter_for_same_rubric].used_in_round
         counter_for_same_rubric += 1
       else
         @round = questionnaires[0].used_in_round
         counter_for_same_rubric = 0
       end
     end
     
     # line which is causing the issue
     @vmlist << populate_view_model(@participant, questionnaire, @team)
   end
       

```

Modified code (replace above line):

```

     if questionnaire.display_type == "Teammate Review"
       # as teammate review will be different for each participant
       # we need to create a separate table for each teammate
       @participant.team.participants.each do |participant|
         @vmlist << populate_view_model(participant, questionnaire, @team)
       end
     else
       # only one participant needs iterating, as apart from teammatereview
       # all other reviews are at "team" level
       @vmlist << populate_view_model(@participant, questionnaire, @team)
     end

```


Image 1. Instructor's view of teammate review

The proposed expanded student display.
The proposed expanded student display.


The `populate_view_model` returns an instance of `VmQuestionResponse`. This model represents the data required to render the table along with it's metadata, like `list_of_reviews` which is used to render the rows.

Present Status of the application

Image 1. Instructor's view of teammate review: This is the current screen given to the instructor. Here we see that the instructor can not determine who has given which review to which student.

The proposed expanded student display.
The proposed expanded student display.


Image 2. Student's view of teammate review: Currently, a student is not able to see what grades were given by their teammates. We need to implement that functionality so that the student is able to view the grades.

The current instructor view.
The current review display for instructors.


Image 3. UML Diagram: We are planning to add two variables namely showTeammateReview and hideReviewerName. showTeammateReview will decide whether the students would be able to view their team members reviews. hideReviewerName will decide whether the student is able to view peer's names or not.

The proposed condensed student display.
The proposed condensed student display.


Proposed changes

1) Proposed UI for instructor : The instructor is able to see the score for all teammates. In the existing code, only one teammate's scores are being shown. But, we are planning to change the way the VmQuestionResponse array is created, so that the scores for all teammates are appended to it so it correctly shows what should have already been shown in this screen for the instructor.

Proposed UI for instructor
Proposed UI for instructor.


Note: When a student visits this screen, they will only be shown the reviews received by them, assuming the instructor has allowed visibility of teammate reviews to students.


2) Error in existing UI for student : In the existing UI for a student, the highlighted block should not be rendered. This part of the screen is meant for the instructors/TAs. This portion of the screen being rendered to a student is a mistake, and we will remove this part of the screen from the student's screen as part of our proposed changes.

Existing UI for student
Existing UI for student.


3) Show teammate review to student UI : The existing code doesn't render a student's teammate review scores at all. We are planning to render the scores to a student when they visit this screen. However, the visibility of this screen is contingent on whether the instructor has allowed visibility of the teammate review screen to students. If the instructor has disabled this feature, then the heatgrid will not be displayed at all.


New UI for students
New UI for students

Design Patterns

We think that we will be using Abstract Factory for our implementation but this may change as we further our development.


User Stories

1. As an instructor, I can view what reviews one teammate has given to other teammates.

2. As a student, I can view what reviews my teammates have given to me.

3. As an instructor, I can select if a student's reviews are anonymously shown to their teammates.


Testing

We will be using RSpec and Capybara for unit and functional testing. UI testing will be done manually.


References

https://expertiza.ncsu.edu/