CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric

From Expertiza_Wiki
Jump to navigation Jump to search

Introduction

The rubrics in expertiza are created by instructors. These Rubrics only contain questions that are related to the existed topics. Now, Expertiza only supports students to pull questionnaires is specific rubrics to get some help. Even that they can ask about anything that is relevant to all the projects that will be submitted But when students encounter difficult problems which are not in the existed topics, and they want to get special advice on that new field, the demand for creating supplementary review questionnaire raises. This project (E1981) aims to solve this problem by allowing students to add questions to the standard instructor generated rubric so that they can get specific feedback on from the reviewers.

The github repository is https://github.com/Jas0nch/expertiza. And the demo video in youtube is https://youtu.be/8pLKBOgDggM

Proposed solution

We will add the Supplementary Review Questions to the current Review Questions, and show these student-generated questions under the rubric given by instructor. Even though these questions won't be graded, they will eventually provide diversity for feedback. It will increase the benefit that each team gets because they can get feedback that is specific to their project.


Implementation

Design Strategy

Goal: In Expertiza, all kinds of rubrics and surveys are subclasses of Questionnaire. A Questionnaire can contain “questions” of several types (e.g., checkboxes, dropdowns, text boxes). We'll add a new subclass of Questionnaire called, say, SupplementalReviewQuestionnaire.

1. there should be a checkbox when creating the whole questionnaire to indicate whether this questionnaire will have supplemental review questions or not.

2. there should be a button that has the content "add supplemental questions".

 a. if you click that button, it will redirect to a page that an instructor uses to create a supplemental questionnaire.
 b. when the supplemental questionnaire is created, it should append to the existed questionnaire.

3. After the reviewer finished the review, student can find the supplemental questionnaire in the review page.

How we will do this:

1. add a variable in the questionnaire class.

2. add another file for a supplemental questionnaire and save them to the database.

3. add a method to get the corresponding supplemental questionnaire and to add questions into the existed questionnaire.

4. we should add another method to show the supplemental questionnaire in the review page.

Modifications in the User Interface (Todo)

1. Assignment Creation Page in Instructor's Account

We plan to implement a check box under the column of Rubrics in the assignment creation page indicating whether the instructor allows students to add specific questionnaires with respect to their projects.

2. Your Work Page in A Student's Account

We plan to implement a link or button on the Your Work page of an assignment of a student whose assignment is enabled to create supplementary review questionnaires by the instructor, in order to redirect to the Review Rubrics Creation page.

3. Review Rubrics Creation Page

In this page, students are able to create supplementary review questions regarding the specifics of their own assignments.

4. Review Page

In the Review Page of reviewers, the supplementary review questions created by the owner of the assignment will be shown to reviewers along with the standard review questions created by the instructor.

5. Review Results Page

The Review Results Page should display the results of standard questions created by the instructor as well as the results of supplementary review questions created by the instructor.

Use Cases

Test Plan

RSpec Test

  • There should be no link for "Supplementary Review Questionnaire" for team members or reviewerss, if the instructor disables this section in Assignment Creation Page.
  • If the instructor enables this section, the link for "Supplementary Review Questionnaire" should appear in the "Your Work" section of a student, and redirect to Review Rubrics Creation Page.
  • After created or edited, the supplementary review questions should appear as part of the whole review question sheet in Review Page (along with the standard review questions created by the instructor), to team members, reviewers, and the instructor.
  • After a reviewer saves or submits, the responses to the supplementary review questions should appear when (s)he views the responses.
  • After review deadline, all responses to the supplementary review questions of reviewers should appear in My score page of students.


Test Results

spec/controllers/supplementary_review_questionnaires_spec.rb

Test if the link of "Create Supplementary Review Questionnaire" correctly redirects to the right page.

describe SupplementaryReviewQuestionnairesController do
    let(:team) { build(:assignment_team, id: 1, name: "team1", assignment: assignment) }
    let(:student1) { build(:student, id: 1, name: "student1") }
    let(:student2) { build(:student, id: 2, name: "student2") }
    let(:participant) { build(:participant, id: 1, user: student1, assignment: assignment) }
    let(:participant2) { build(:participant, id: 2, user: student2, assignment: assignment) }
    let(:assignment) { build(:assignment, id: 1) }

    # test the method of create_supplementary_review_questionnaire
    describe '#create_supplementary_review_questionnaire' do
        it 'redirects to questionnaires#edit page after create a new supplementary review questionnaire' do
            session = {user: student1}
            allow(AssignmentParticipant).to receive(:find).with('1').and_return(participant) 
            allow(participant).to receive(:team).and_return(team)
            allow(Team).to receive(:find).with(1).and_return(team) 
            params = {id: 1}
            get :create_supplementary_review_questionnaire, params, session
            expect(response).to redirect_to("/supplementary_review_questionnaires/#{team.supplementary_review_questionnaire_id}/edit")
        end
    end

end

spec/features/supplementary_review_questionnaire_spec.rb

Test if a supplementary questionnaire can be created, modifid and stored.

describe "Supplementary Review Questionnaire", js: true do
    before(:each) do
        create(:assignment, name: "TestAssignment", directory_path: "TestAssignment")
        create_list(:participant, 3)
        create(:topic, topic_name: "TestTopic")
        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: "submission").first, due_at: DateTime.now.in_time_zone + 1.day)
        (1..3).each do |i|
            create(:course, name: "Course #{i}")
        end

        (1..3).each do |i|
            create(:questionnaire, name: "ReviewQuestionnaire#{i}")
            create(:questionnaire, name: "AuthorFeedbackQuestionnaire#{i}", type: 'AuthorFeedbackQuestionnaire')
            create(:questionnaire, name: "TeammateReviewQuestionnaire#{i}", type: 'TeammateReviewQuestionnaire')
        end
    end

    def signup_topic
        user = User.find_by(name: "student2064")
        stub_current_user(user, user.role.name, user.role)
        visit '/student_task/list'
        visit '/sign_up_sheet/sign_up?id=1&topic_id=1' # signup topic
        visit '/student_task/list'
        click_link "TestAssignment"
        expect(page).to have_content("Your work")
        click_link "Your work"
    end

    it "can create assignment with supplementary review questoinnaire" do
        # Instructor logs in and visits the page of assignment creation
        login_as("instructor6")
        visit '/assignments/new?private=1'
        
        # Fill in the form under 'General'
        fill_in 'assignment_form_assignment_name', with: 'test assignment'
        select('Course 2', from: 'assignment_form_assignment_course_id')
        fill_in 'assignment_form_assignment_directory_path', with: 'test directory'
        check("team_assignment")

        # Fill in the form under 'Rubrics'
        click_link 'Rubrics'

        within(:css, "tr#questionnaire_table_ReviewQuestionnaire") do
            select "ReviewQuestionnaire2", from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'
        end


        within(:css, "tr#questionnaire_table_AuthorFeedbackQuestionnaire") do
            select "AuthorFeedbackQuestionnaire2", from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'
        end

        within(:css, "tr#questionnaire_table_TeammateReviewQuestionnaire") do
            select "TeammateReviewQuestionnaire2", from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'
        end

        # Fill in the form under Review strategy
        click_link 'Review strategy'
        check 'assignment_form_assignment_is_supplementary_review_enabled'

        # Click to create the assignment
        click_button 'Create'
  
        # check if the assignment is created successfully
        assignment = Assignment.where(name: 'test assignment').first
        expect(assignment).to have_attributes(
            is_supplementary_review_enabled: true
        )
    end

    it "can add supplementary review questions" do
        signup_topic
        click_link 'Create/Edit Supplementary Review Questionnaire'
        expect(page).to have_content("Edit Review")
    end
end

spec/models/team_spec.rb

describe '.get_supplementary_review_questionnaire_id_of_team' do
    it 'return supplementary_review_questionnaire_id of team' do
        allow(Team).to receive(:find).with(1).and_return(team)
       expect(Team.get_supplementary_review_questionnaire_id_of_team(1)).to eq(1)
    end
end


UI Test

1. When a new assignment is created, the instructor can enable supplementary questionnaire via the highlighted checkbox.

 a. Log in as an instructor, create a new assignment.
b. In the Review Strategy table, check "Allow student-generated questions added to rubric?".
c. Create two teams each containing two students.

2. In the submit stage, all team members can create and edit one supplementary quetionnaire to their team.

 a. Impersonate as a student, there will be a link to "create supplementary review questionnaire" as highlighted, in the "Your work" page.
b. Click on the link, and you will be able to add, edit, and remove questions of the supplementary questionnaire which belongs to your team.
c. Switch to another member of the same team, then you will be able to modify the same supplementary questionnaire.

3. In the review stage, reviewers will get one complete questionnaire (including both the regular questionnaire created by intructor, and the supplementary questionnaire created by the team) and do the review.

 a. Revert as instructor, change the due date to make it forward to review stage.
b. Impersonate as every student.
c. Request a review, then begin it, edit, save, submit, and view the responses.
d. The questionnaire will completely include both parts, and your responses will correctly show in the view page.

4. After review stage, team members can view the list of all the scores and responses of the complete questionnaire of their team.

 a. Impersonate as any student.
b. Click on "Your score" to see all the scores and responses of your complete questionnaire.
c. The table correctly shows the scores and respones from reviewers.
d. Click on "toggle question list" to see your questionaire. It correctly includes both parts.

Files added/modified

All modifications are included in the Pull Request.

A new class SupplementaryReviewQuestionnaire (subclass of Questionnaire) is created.

app/controllers/supplementary_review_questionnaires_controller.rb

app/models/supplementary_review_questionnaire.rb

app/models/questionnaire.rb

A new boolean column :is_supplementary_review_enabled is added to Assignment.

db/migrate/20191126025227_add_is_supplementary_review_enabled_to_assignment.rb

Routes related to SupplementaryReviewQuestionnaire are updated.

config/routes.rb

A new integer column :supplementary_review_questionnaire_id is added to Team.

app/models/team.rb

db/migrate/20191126032312_add_supplementary_review_questionnaire_id_to_team.rb

Supplementary questions are found and added into controllers and views.

app/controllers/grades_controller.rb

app/controllers/questionnaires_controller.rb

app/controllers/response_controller.rb

app/helpers/grades_helper.rb

app/models/response.rb

app/views/response/response.html.erb

Modifications on view pages including checkbox and links.

app/views/assignments/edit/_review_strategy.html.erb

app/views/submitted_content/_main.html.erb

Tests added or modified.

spec/controllers/questionnaires_controller_spec.rb

spec/controllers/supplementary_review_questionnaires_controller_spec.rb

spec/controllers/supplementary_review_questionnaires_spec.rb

spec/factories/factories.rb

spec/features/supplementary_review_questionnaire_spec.rb

spec/models/assignment_spec.rb

spec/models/team_spec.rb

Team members

Hua Cao

Heng Yu

Chien-Yuan Wang

Benjamin Ding

Links

Expertiza on Github:

https://github.com/Jas0nch/expertiza/tree/beta

Pull Request:

Issue #1658

Pull Request History:

Add supplementary questions for students

Supplementary questionnaire and responses can be correctly shown, edited, and stored.

Add supplementary questions in grades controller

Add supplementary questions for retrieve_questins method

Add test for questionnares_controller and .get_supplementary_review_questionnaire_id_of_team.

Add tests for check box and link in your work and fix bugs

Video:

https://youtu.be/yeAjjgaV10w