CSC/ECE 517 Spring 2018- Project E1824: Let course staff as well as students do reviews: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 123: Line 123:
     expect(page).to have_content 'View review'
     expect(page).to have_content 'View review'
     click_link "View review"
     click_link "View review"
     expect(page).to have_content "Hello world"
     expect(page).to have_content "show review"
   end
   end


Line 136: Line 136:
     expect(page).to have_content 'Edit review'
     expect(page).to have_content 'Edit review'
     click_link "Edit review"
     click_link "Edit review"
     expect(page).to have_content "Good job"
     expect(page).to have_text "Good job"
     fill_in "review[comments]", with: "Excellent work"
     fill_in "review[comments]", with: "Excellent work"
     click_link "Save Review"
     click_button "Save Review"
     expect(page).to have_content "Your response was successfully saved."
     expect(page.current_path).to eq "/student_review/list"
   end
   end
end
end

Revision as of 04:52, 30 April 2018

Introduction

The way Expertiza is set up right now is that only peers can review your work. However, there are cases when the instructor would want to submit reviews as well. This project aims to implement this feature by allowing instructors to review the project on the same metrics as other students who review the project.


Problem Statement

Peer review is a great way for students to learn about how well they have developed their application. However there are some problems with this:

  • Sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development.
  • The reviewer might not know how well they are reviewing the peer's work. They might not entirely know as to what tone to use or what suggestions to put forward.

By letting course staff perform reviews as well, the reviewer and the reviewee are both benefited, which can improve the overall learning experience.


Current scenario

This is how some of the pages we are concerned with, currently look.


Submissions page for an assignment in Instructor View


A typical Scores table in a Student View

Proposed Solutions

We propose to perform the following changes to let staff perform reviews as well:

Step 1: Add a Perform review link in the assignment submissions page view for the instructors.


Files to be edited:

  • View: app/views/assignments/list_submissions.html.erb
  • Controller: app/controllers/response_controller.rb - Add authorization for instructors to perform review

In the second case, we can see a 'Perform Review' link. This is the initial state when instructor review has not been added to the submission. Once the instructor adds a review, we can see the 'View Review' and 'Edit Review' links, as seen in the first case. If the review deadline of one round is passed, the 'Edit Review' link becomes 'Update Review' link. The course staff will be allowed to perform a review even if the deadline for reviewing has passed.

Step 2: Add instructor review in Your Scores table in case he has reviewed your work. Provide a highlight/way to make it look distinct.


Files to be edited:

  • View: app/views/grades/view_team.html.erb
  • Controller: app/controllers/grades_controller.rb - Method: view_team

A student should be able to make out if an instructor has reviewed his/his team's work. In case the instructor performs a review on the team's work, it will highlight the instructor's review as seen in the round two score table. The average peer review score for the team has been modified to exclude the instructor's scores. Same has been taken into account for the average score calculated for each row.

Test Plan

Features testing: Many of our changes would be reflected on views (user interface). Following is the list of tests that should be conducted with rspec/capybara.

  1. it "should let instructor/TAs perform a review for the submission of latest finished round if instructor/TAs has not started a review for the submission yet"
  2. it "should let instructor/TAs save a review"
  3. it "should let instructor/TAs review a previously saved review"
  4. it "should let instructor/TAs edit a previously saved review"
  5. it "should let instructor/TAs update a review for the submission of latest finished round if instructor/TAs performed and saved a review for the previous round"
  6. it "should allow instructor/TAs perform a review after the deadline for reviewing has passed"
  7. it "should show "Instructor review" when a student views feedback on his/her submission if an instructor/TA has reviewed his/his team's work"
  8. it "should exclude the instructor's/TA's review score when calculating the average peer review score for the team"
  9. it "should exclude the instructor's/TA's review score when calculating the average score for each question in the review"
describe "instructor review testing" do
  before(:each) do
    create(:assignment, name: "TestAssignment", directory_path: 'test_assignment')
    create_list(:participant, 3)
    create(:assignment_node)
    create(:deadline_type, name: "submission")
    create(:deadline_type, name: "review")
    create(:deadline_type, name: "metareview")
    create(:deadline_type, name: "drop_topic")
    create(:deadline_type, name: "signup")
    create(:deadline_type, name: "team_formation")
    create(:deadline_right)
    create(:deadline_right, name: 'Late')
    create(:deadline_right, name: 'OK')
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: 'review').first, due_at: Time.now.in_time_zone + 1.day)
    create(:topic)
    create(:topic, topic_name: "TestReview")
    create(:team_user, user: User.where(role_id: 2).first)
    create(:team_user, user: User.where(role_id: 2).second)
    create(:assignment_team)
    create(:team_user, user: User.where(role_id: 2).third, team: AssignmentTeam.second)
    create(:signed_up_team)
    create(:signed_up_team, team_id: 2, topic: SignUpTopic.second)
    create(:assignment_questionnaire)
    create(:question)
    create(:review_response_map, reviewer_id: User.find_by(name: "instructor6").id, reviewee: AssignmentTeam.second)
  end

  it "lets instructor perform a review and saves" do
    assignment = Assignment.first
    login_as("instructor6")
    visit "/assignments/list_submissions?id=#{assignment.id}"
    expect(page).to have_content 'Perform review'
    all(:link, 'Perform review')[1].click
    fill_in "responses[0][comment]", with: "DRY"
    select 5, from: "responses[0][score]"
    click_button "Save Review"
    expect(page).to have_content "Your response was successfully saved."
  end

  it "lets instructor view a saved review" do
    assignment = Assignment.first
    login_as("instructor6")
    visit "/assignments/list_submissions?id=#{assignment.id}"
    all(:link, 'Perform review')[1].click
    fill_in "responses[0][comment]", with: "Hello world"
    click_button "Save Review"
    visit "/assignments/list_submissions?id=#{assignment.id}"
    expect(page).to have_content 'View review'
    click_link "View review"
    expect(page).to have_content "show review"
  end

  it "lets instructor edit a saved review and saves" do
    assignment = Assignment.first
    login_as("instructor6")
    visit "/assignments/list_submissions?id=#{assignment.id}"
    all(:link, 'Perform review')[1].click
    fill_in "responses[0][comment]", with: "Good job"
    click_button "Save Review"
    visit "/assignments/list_submissions?id=#{assignment.id}"
    expect(page).to have_content 'Edit review'
    click_link "Edit review"
    expect(page).to have_text "Good job"
    fill_in "review[comments]", with: "Excellent work"
    click_button "Save Review"
    expect(page.current_path).to eq "/student_review/list"
  end
end

Controllers testing: review_mapping_controller#add_instructor_as_reviewer

  describe '#add_instructor_as_reviewer' do
    context 'when instructor is not a participant for the assignment and review_response_map has not been created' do
      it 'adds instructor as a participant for the assignment and creates review_response_map and redirects to responses#new' do
        allow(AssignmentTeam).to receive(:find).with('1').and_return(team2)
        allow(AssignmentParticipant).to receive_message_chain(:where, :first)
          .with(user_id: 1, parent_id: '1').with(no_args).and_return(nil)
        allow(AssignmentParticipant).to receive(:create)
          .with(parent_id: '1', user_id: 1, can_submit: false, can_review: true, can_take_quiz: false, handle: 'handle').and_return(participant)
        allow(ReviewResponseMap).to receive_message_chain(:where, :first)
          .with(reviewee_id: '1', reviewer_id: 1, reviewed_object_id: '1').with(no_args).and_return(nil)
        allow(team2).to receive(:assign_reviewer)
          .with(participant).and_return(review_response_map)
        params = {id: 1, team_id: 1, assignment_id: 1}
        session = {user: build(:instructor, id: 1)}
        get :add_instructor_as_reviewer, params, session
        expect(response).to redirect_to '/response/new?id=1'
      end
    end

    context 'when instructor is already a participant for the assignment and review_response_map has been created' do
      it 'does not need to add instructor as a participant for the assignment or create review_repsonse_map and redirects to response#new' do
        allow(AssignmentTeam).to receive(:find).with('1').and_return(team2)
        allow(AssignmentParticipant).to receive_message_chain(:where, :first)
          .with(user_id: 1, parent_id: '1').with(no_args).and_return(participant)
        allow(ReviewResponseMap).to receive_message_chain(:where, :first)
          .with(reviewee_id: '1', reviewer_id: 1, reviewed_object_id: '1').with(no_args).and_return(review_response_map)
        params = {id: 1, team_id: 1, assignment_id: 1}
        session = {user: build(:instructor, id: 1)}
        get :add_instructor_as_reviewer, params, session
        expect(response).to redirect_to '/response/new?id=1'
      end
    end
  end

External Links

Team Members

  • Ashis Sahoo
  • Satvik Shetty
  • Xiaohui Ellis
  • Kushal Nawalakha


References

Expertiza

Expertiza Github

Expertiza Documentation