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

From Expertiza_Wiki
Jump to navigation Jump to search
Line 40: Line 40:


== Control Flow to access the concerned screens ==
== Control Flow to access the concerned screens ==
'''1. Instructor:-'''
'''1. For instructor (Log in as an instructor):-'''


Screen after logging in by instructor
Screen after logging in by the instructor
[[File:Instructor-1.png |border|700px|center|alt=Flow diagram of proposed changes for showing team review data to instructor]]
[[File:ss1.png |border|1000px|center]]
Click on view submissions
Got to assignments on the Manage menu
[[File:Instructor-2.png |border|700px|center|alt=Flow diagram of proposed changes for showing team review data to instructor]]
[[File:ss2.png |border|1000px|center]]
Then click on assign grade
Go to assignments
[[File:Instructor-3.png |border|700px|center|alt=Flow diagram of proposed changes for showing team review data to instructor]]
[[File:ss3.png |border|1000px|center]]
Here the prospective changes would be made
Go to submissions for any assignment
[[File:Instructor-4.png |border|700px|center|alt=Flow diagram of proposed changes for showing team review data to instructor]]
[[File:ss4a.png |border|1000px|center]]
Go to Assign Grade
[[File:ss5a.png |border|1000px|center]]
You will land on the page where the changes are made and can be reviewed
[[File:ss7a.png |border|1000px|center]]


'''2. Student:-'''
'''2. Student:- (Logged in as an instructor)'''


Click on the particular project
After landing on the assignments page, select any student from an assignment as shown below
[[File:Student-2.png |border|700px|center|alt=Flow diagram of proposed changes for showing team review data to instructor]]
[[File:ss6a.png |border|1000px|center]]
Then click on your scores
Go to/Select any assignment
[[File:Student-3.png |border|700px|center|alt=Flow diagram of proposed changes for showing team review data to instructor]]
[[File:ss9a.png |border|1000px|center]]
Here the prospective changes would be made
Go to your scores
[[File:Student-4.png |border|700px|center|alt=Flow diagram of proposed changes for showing team review data to instructor]]
[[File:ss10a.png |border|1000px|center]]
You will land on the page where the changes are made and can be reviewed
[[File:ss11a.png |border|1000px|center]]


== Models used / Explanation of fixes ==
== Models used / Explanation of fixes ==

Revision as of 00:50, 28 November 2021

Team Introduction

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

1. Anjali Garg (unity ID : agarg25)

2. Arvasu Chikara (unity ID: achikar2)

3. Lalit Bangad (unity ID: llbangad)

4. Vinay Deshmukh (unity ID: vdeshmu)

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

1. For instructor (Log in as an instructor):-

Screen after logging in by the instructor

Got to assignments on the Manage menu

Go to assignments

Go to submissions for any assignment

Go to Assign Grade

You will land on the page where the changes are made and can be reviewed

2. Student:- (Logged in as an instructor)

After landing on the assignments page, select any student from an assignment as shown below

Go to/Select any assignment

Go to your scores

You will land on the page where the changes are made and can be reviewed

Models used / Explanation of fixes

The below 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.

Flow diagram of proposed changes for showing team review data to 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 the line which is causing issues):


     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

The `populate_view_model` method 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 in a team.

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 those 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 the reviews given to them by their teammates. hideReviewerName will decide whether the student is able to view the reviewee's name 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 populated)[1], 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 (as shown below) 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

Files to be modified

In the current design plan, the following files are planned to be edited:

1. app/controllers/grades_controller.rb - Controller file which will change how the view model is populated

2. app/views/grades/view_team.html.erb - View file, which will conditionally render the teammate name, for a teammate review heatgrid

3. spec/controllers/grades_controller_spec.rb - For tests verifying the proposed changes

4. app/models/vm_question_response.rb - We need to modify the view-model so it can tell us the name of the person being reviewed for the current heatgrid

Apart from these, there will be a schema change for the `Assignment` model, as we need to add the appropriate boolean flags

Design Patterns

Existing code does not use any design patterns, apart from if-else. It uses if-else conditional statements to check what type of questionnaire is present in the viewmodel `VmQuestionResponse`, and based on that, it renders the appropriate content.


We can use decorator pattern, for handling the visibility of the heatgrid when rendering heatgrids for a student login.

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

CURRENT STATUS

1. Presently, the tests only cover if the view_team is page is rendered when it is asked for.

New UI for students
New UI for students


OUR PROPOSAL

- When show_team is set as false by the professor, the student should not be able to see his scores.

- When show_team is set as true by the professor, the student should be able to see his.

- An instructor can select which student's scores he/she wants to see. If no student's name is selected then the professor can see the scores of all the students. - The instructor can decide whether to show the names of the reviewer to the reviewer in teammate reviews, by selecting a checkbox for the same.

New UI for students
New UI for students


References

https://expertiza.ncsu.edu/