<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hcao5</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hcao5"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Hcao5"/>
	<updated>2026-09-12T15:58:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=131387</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=131387"/>
		<updated>2019-12-19T02:41:38Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The github repository is https://github.com/Jas0nch/expertiza. And the demo video in youtube is https://youtu.be/8pLKBOgDggM&lt;br /&gt;
&lt;br /&gt;
== Proposed solution ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Design Strategy ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
1. there should be a checkbox when creating the whole questionnaire to indicate whether this questionnaire will have supplemental review questions or not. &lt;br /&gt;
&lt;br /&gt;
2. there should be a button that has the content &amp;quot;add supplemental questions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  a. if you click that button, it will redirect to a page that an instructor uses to create a supplemental questionnaire.&lt;br /&gt;
&lt;br /&gt;
  b. when the supplemental questionnaire is created, it should append to the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. After the reviewer finished the review, student can find the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
How we will do this:&lt;br /&gt;
&lt;br /&gt;
1. add a variable in the questionnaire class.&lt;br /&gt;
&lt;br /&gt;
2. add another file for a supplemental questionnaire and save them to the database.&lt;br /&gt;
&lt;br /&gt;
3. add a method to get the corresponding supplemental questionnaire and to add questions into the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
4. we should add another method to show the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
=== Modifications in the User Interface (Todo) === &lt;br /&gt;
&lt;br /&gt;
1. Assignment Creation Page in Instructor's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
2. Your Work Page in A Student's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
3. Review Rubrics Creation Page&lt;br /&gt;
&lt;br /&gt;
In this page, students are able to create supplementary review questions regarding the specifics of their own assignments.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases == &lt;br /&gt;
&lt;br /&gt;
[[File:Use_Cases.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== RSpec Test ===&lt;br /&gt;
&lt;br /&gt;
* There should be no link for &amp;quot;Supplementary Review Questionnaire&amp;quot; for team members or reviewerss, if the instructor disables this section in Assignment Creation Page.&lt;br /&gt;
&lt;br /&gt;
* If the instructor enables this section, the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; should appear in the &amp;quot;Your Work&amp;quot; section of a student, and redirect to Review Rubrics Creation Page.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* After a reviewer saves or submits, the responses to the supplementary review questions should appear when (s)he views the responses.&lt;br /&gt;
&lt;br /&gt;
* After review deadline, all responses to the supplementary review questions of reviewers should appear in My score page of students.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test Results ===&lt;br /&gt;
&lt;br /&gt;
'''spec/controllers/supplementary_review_questionnaires_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
Test if the link of &amp;quot;Create Supplementary Review Questionnaire&amp;quot; correctly redirects to the right page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe SupplementaryReviewQuestionnairesController do&lt;br /&gt;
    let(:team) { build(:assignment_team, id: 1, name: &amp;quot;team1&amp;quot;, assignment: assignment) }&lt;br /&gt;
    let(:student1) { build(:student, id: 1, name: &amp;quot;student1&amp;quot;) }&lt;br /&gt;
    let(:student2) { build(:student, id: 2, name: &amp;quot;student2&amp;quot;) }&lt;br /&gt;
    let(:participant) { build(:participant, id: 1, user: student1, assignment: assignment) }&lt;br /&gt;
    let(:participant2) { build(:participant, id: 2, user: student2, assignment: assignment) }&lt;br /&gt;
    let(:assignment) { build(:assignment, id: 1) }&lt;br /&gt;
&lt;br /&gt;
    # test the method of create_supplementary_review_questionnaire&lt;br /&gt;
    describe '#create_supplementary_review_questionnaire' do&lt;br /&gt;
        it 'redirects to questionnaires#edit page after create a new supplementary review questionnaire' do&lt;br /&gt;
            session = {user: student1}&lt;br /&gt;
            allow(AssignmentParticipant).to receive(:find).with('1').and_return(participant) &lt;br /&gt;
            allow(participant).to receive(:team).and_return(team)&lt;br /&gt;
            allow(Team).to receive(:find).with(1).and_return(team) &lt;br /&gt;
            params = {id: 1}&lt;br /&gt;
            get :create_supplementary_review_questionnaire, params, session&lt;br /&gt;
            expect(response).to redirect_to(&amp;quot;/supplementary_review_questionnaires/#{team.supplementary_review_questionnaire_id}/edit&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''spec/features/supplementary_review_questionnaire_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
Test if a supplementary questionnaire can be created, modifid and stored.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe &amp;quot;Supplementary Review Questionnaire&amp;quot;, js: true do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
        create(:assignment, name: &amp;quot;TestAssignment&amp;quot;, directory_path: &amp;quot;TestAssignment&amp;quot;)&lt;br /&gt;
        create_list(:participant, 3)&lt;br /&gt;
        create(:topic, topic_name: &amp;quot;TestTopic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;submission&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;review&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;metareview&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;drop_topic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;signup&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;team_formation&amp;quot;)&lt;br /&gt;
        create(:deadline_right)&lt;br /&gt;
        create(:deadline_right, name: 'Late')&lt;br /&gt;
        create(:deadline_right, name: 'OK')&lt;br /&gt;
        create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
        (1..3).each do |i|&lt;br /&gt;
            create(:course, name: &amp;quot;Course #{i}&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        (1..3).each do |i|&lt;br /&gt;
            create(:questionnaire, name: &amp;quot;ReviewQuestionnaire#{i}&amp;quot;)&lt;br /&gt;
            create(:questionnaire, name: &amp;quot;AuthorFeedbackQuestionnaire#{i}&amp;quot;, type: 'AuthorFeedbackQuestionnaire')&lt;br /&gt;
            create(:questionnaire, name: &amp;quot;TeammateReviewQuestionnaire#{i}&amp;quot;, type: 'TeammateReviewQuestionnaire')&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def signup_topic&lt;br /&gt;
        user = User.find_by(name: &amp;quot;student2064&amp;quot;)&lt;br /&gt;
        stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
        visit '/student_task/list'&lt;br /&gt;
        visit '/sign_up_sheet/sign_up?id=1&amp;amp;topic_id=1' # signup topic&lt;br /&gt;
        visit '/student_task/list'&lt;br /&gt;
        click_link &amp;quot;TestAssignment&amp;quot;&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Your work&amp;quot;)&lt;br /&gt;
        click_link &amp;quot;Your work&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;can create assignment with supplementary review questoinnaire&amp;quot; do&lt;br /&gt;
        # Instructor logs in and visits the page of assignment creation&lt;br /&gt;
        login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
        visit '/assignments/new?private=1'&lt;br /&gt;
        &lt;br /&gt;
        # Fill in the form under 'General'&lt;br /&gt;
        fill_in 'assignment_form_assignment_name', with: 'test assignment'&lt;br /&gt;
        select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in 'assignment_form_assignment_directory_path', with: 'test directory'&lt;br /&gt;
        check(&amp;quot;team_assignment&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
        # Fill in the form under 'Rubrics'&lt;br /&gt;
        click_link 'Rubrics'&lt;br /&gt;
&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_ReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
            select &amp;quot;ReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_AuthorFeedbackQuestionnaire&amp;quot;) do&lt;br /&gt;
            select &amp;quot;AuthorFeedbackQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
            select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        # Fill in the form under Review strategy&lt;br /&gt;
        click_link 'Review strategy'&lt;br /&gt;
        check 'assignment_form_assignment_is_supplementary_review_enabled'&lt;br /&gt;
&lt;br /&gt;
        # Click to create the assignment&lt;br /&gt;
        click_button 'Create'&lt;br /&gt;
  &lt;br /&gt;
        # check if the assignment is created successfully&lt;br /&gt;
        assignment = Assignment.where(name: 'test assignment').first&lt;br /&gt;
        expect(assignment).to have_attributes(&lt;br /&gt;
            is_supplementary_review_enabled: true&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;can add supplementary review questions&amp;quot; do&lt;br /&gt;
        signup_topic&lt;br /&gt;
        click_link 'Create/Edit Supplementary Review Questionnaire'&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Edit Review&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''spec/models/team_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe '.get_supplementary_review_questionnaire_id_of_team' do&lt;br /&gt;
    it 'return supplementary_review_questionnaire_id of team' do&lt;br /&gt;
        allow(Team).to receive(:find).with(1).and_return(team)&lt;br /&gt;
       expect(Team.get_supplementary_review_questionnaire_id_of_team(1)).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UI Test ===&lt;br /&gt;
&lt;br /&gt;
1. When a new assignment is created, the instructor can enable supplementary questionnaire via the highlighted checkbox.&lt;br /&gt;
&lt;br /&gt;
  a. Log in as an instructor, create a new assignment.&amp;lt;br&amp;gt;&lt;br /&gt;
  b. In the Review Strategy table, check &amp;quot;Allow student-generated questions added to rubric?&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. Create two teams each containing two students.&lt;br /&gt;
&lt;br /&gt;
[[File:create_new_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
2. In the submit stage, all team members can create and edit one supplementary quetionnaire to their team.&lt;br /&gt;
&lt;br /&gt;
  a. Impersonate as a student, there will be a link to &amp;quot;create supplementary review questionnaire&amp;quot; as highlighted, in the &amp;quot;Your work&amp;quot; page.&amp;lt;br&amp;gt;&lt;br /&gt;
  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.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. Switch to another member of the same team, then you will be able to modify the same supplementary questionnaire.&lt;br /&gt;
&lt;br /&gt;
[[File:create_supplementary_questionnaire.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:create_supplementary_questionnaire_2.png]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
  a. Revert as instructor, change the due date to make it forward to review stage.&amp;lt;br&amp;gt;&lt;br /&gt;
  b. Impersonate as every student.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. Request a review, then begin it, edit, save, submit, and view the responses.&amp;lt;br&amp;gt;&lt;br /&gt;
  d. The questionnaire will completely include both parts, and your responses will correctly show in the view page.&lt;br /&gt;
&lt;br /&gt;
[[File:view_responses_reviewer.png]]&lt;br /&gt;
&lt;br /&gt;
4. After review stage, team members can view the list of all the scores and responses of the complete questionnaire of their team.&lt;br /&gt;
&lt;br /&gt;
  a. Impersonate as any student.&amp;lt;br&amp;gt;&lt;br /&gt;
  b. Click on &amp;quot;Your score&amp;quot; to see all the scores and responses of your complete questionnaire.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. The table correctly shows the scores and respones from reviewers.&amp;lt;br&amp;gt;&lt;br /&gt;
  d. Click on &amp;quot;toggle question list&amp;quot; to see your questionaire. It correctly includes both parts.&lt;br /&gt;
&lt;br /&gt;
[[File:view_your_score.png]]&lt;br /&gt;
&lt;br /&gt;
== Files added/modified ==&lt;br /&gt;
&lt;br /&gt;
All modifications are included in the [https://github.com/expertiza/expertiza/pull/1658 Pull Request].&lt;br /&gt;
&lt;br /&gt;
'''A new class SupplementaryReviewQuestionnaire (subclass of Questionnaire) is created.'''&lt;br /&gt;
&lt;br /&gt;
app/controllers/supplementary_review_questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/models/supplementary_review_questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
app/models/questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
'''A new boolean column :is_supplementary_review_enabled is added to Assignment.'''&lt;br /&gt;
&lt;br /&gt;
db/migrate/20191126025227_add_is_supplementary_review_enabled_to_assignment.rb&lt;br /&gt;
&lt;br /&gt;
'''Routes related to SupplementaryReviewQuestionnaire are updated.'''&lt;br /&gt;
&lt;br /&gt;
config/routes.rb&lt;br /&gt;
&lt;br /&gt;
'''A new integer column :supplementary_review_questionnaire_id is added to Team.'''&lt;br /&gt;
&lt;br /&gt;
app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
db/migrate/20191126032312_add_supplementary_review_questionnaire_id_to_team.rb&lt;br /&gt;
&lt;br /&gt;
'''Supplementary questions are found and added into controllers and views.'''&lt;br /&gt;
&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/response_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/helpers/grades_helper.rb&lt;br /&gt;
&lt;br /&gt;
app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
app/views/response/response.html.erb&lt;br /&gt;
&lt;br /&gt;
'''Modifications on view pages including checkbox and links.'''&lt;br /&gt;
&lt;br /&gt;
app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/submitted_content/_main.html.erb&lt;br /&gt;
&lt;br /&gt;
'''Tests added or modified.'''&lt;br /&gt;
&lt;br /&gt;
spec/controllers/questionnaires_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/controllers/supplementary_review_questionnaires_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/controllers/supplementary_review_questionnaires_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/factories/factories.rb&lt;br /&gt;
&lt;br /&gt;
spec/features/supplementary_review_questionnaire_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/models/assignment_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/models/team_spec.rb&lt;br /&gt;
&lt;br /&gt;
== Team members ==&lt;br /&gt;
Hua Cao&lt;br /&gt;
&lt;br /&gt;
Heng Yu&lt;br /&gt;
&lt;br /&gt;
Chien-Yuan Wang&lt;br /&gt;
&lt;br /&gt;
Benjamin Ding&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
Expertiza on Github:&lt;br /&gt;
&lt;br /&gt;
https://github.com/Jas0nch/expertiza/tree/beta&lt;br /&gt;
&lt;br /&gt;
Pull Request:&lt;br /&gt;
&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/1658 Issue #1658]&lt;br /&gt;
&lt;br /&gt;
Pull Request History:&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/6 Add supplementary questions for students]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/8 Supplementary questionnaire and responses can be correctly shown, edited, and stored.]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/9 Add supplementary questions in grades controller]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/10 Add supplementary questions for retrieve_questins method]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/11 Add test for questionnares_controller and .get_supplementary_review_questionnaire_id_of_team.]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/12 Add tests for check box and link in your work and fix bugs]&lt;br /&gt;
&lt;br /&gt;
Video:&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/yeAjjgaV10w&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=131366</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=131366"/>
		<updated>2019-12-18T03:26:49Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The github repository is https://github.com/Jas0nch/expertiza. And the demo video in youtube is https://www.youtube.com/watch?v=yeAjjgaV10w&amp;amp;feature=youtu.be&lt;br /&gt;
&lt;br /&gt;
== Proposed solution ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Design Strategy ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
1. there should be a checkbox when creating the whole questionnaire to indicate whether this questionnaire will have supplemental review questions or not. &lt;br /&gt;
&lt;br /&gt;
2. there should be a button that has the content &amp;quot;add supplemental questions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  a. if you click that button, it will redirect to a page that an instructor uses to create a supplemental questionnaire.&lt;br /&gt;
&lt;br /&gt;
  b. when the supplemental questionnaire is created, it should append to the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. After the reviewer finished the review, student can find the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
How we will do this:&lt;br /&gt;
&lt;br /&gt;
1. add a variable in the questionnaire class.&lt;br /&gt;
&lt;br /&gt;
2. add another file for a supplemental questionnaire and save them to the database.&lt;br /&gt;
&lt;br /&gt;
3. add a method to get the corresponding supplemental questionnaire and to add questions into the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
4. we should add another method to show the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
=== Modifications in the User Interface (Todo) === &lt;br /&gt;
&lt;br /&gt;
1. Assignment Creation Page in Instructor's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
2. Your Work Page in A Student's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
3. Review Rubrics Creation Page&lt;br /&gt;
&lt;br /&gt;
In this page, students are able to create supplementary review questions regarding the specifics of their own assignments.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases == &lt;br /&gt;
&lt;br /&gt;
[[File:Use_Cases.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== RSpec Test ===&lt;br /&gt;
&lt;br /&gt;
* There should be no link for &amp;quot;Supplementary Review Questionnaire&amp;quot; for team members or reviewerss, if the instructor disables this section in Assignment Creation Page.&lt;br /&gt;
&lt;br /&gt;
* If the instructor enables this section, the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; should appear in the &amp;quot;Your Work&amp;quot; section of a student, and redirect to Review Rubrics Creation Page.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* After a reviewer saves or submits, the responses to the supplementary review questions should appear when (s)he views the responses.&lt;br /&gt;
&lt;br /&gt;
* After review deadline, all responses to the supplementary review questions of reviewers should appear in My score page of students.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test Results ===&lt;br /&gt;
&lt;br /&gt;
'''spec/controllers/supplementary_review_questionnaires_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
Test if the link of &amp;quot;Create Supplementary Review Questionnaire&amp;quot; correctly redirects to the right page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe SupplementaryReviewQuestionnairesController do&lt;br /&gt;
    let(:team) { build(:assignment_team, id: 1, name: &amp;quot;team1&amp;quot;, assignment: assignment) }&lt;br /&gt;
    let(:student1) { build(:student, id: 1, name: &amp;quot;student1&amp;quot;) }&lt;br /&gt;
    let(:student2) { build(:student, id: 2, name: &amp;quot;student2&amp;quot;) }&lt;br /&gt;
    let(:participant) { build(:participant, id: 1, user: student1, assignment: assignment) }&lt;br /&gt;
    let(:participant2) { build(:participant, id: 2, user: student2, assignment: assignment) }&lt;br /&gt;
    let(:assignment) { build(:assignment, id: 1) }&lt;br /&gt;
&lt;br /&gt;
    # test the method of create_supplementary_review_questionnaire&lt;br /&gt;
    describe '#create_supplementary_review_questionnaire' do&lt;br /&gt;
        it 'redirects to questionnaires#edit page after create a new supplementary review questionnaire' do&lt;br /&gt;
            session = {user: student1}&lt;br /&gt;
            allow(AssignmentParticipant).to receive(:find).with('1').and_return(participant) &lt;br /&gt;
            allow(participant).to receive(:team).and_return(team)&lt;br /&gt;
            allow(Team).to receive(:find).with(1).and_return(team) &lt;br /&gt;
            params = {id: 1}&lt;br /&gt;
            get :create_supplementary_review_questionnaire, params, session&lt;br /&gt;
            expect(response).to redirect_to(&amp;quot;/supplementary_review_questionnaires/#{team.supplementary_review_questionnaire_id}/edit&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''spec/features/supplementary_review_questionnaire_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
Test if a supplementary questionnaire can be created, modifid and stored.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe &amp;quot;Supplementary Review Questionnaire&amp;quot;, js: true do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
        create(:assignment, name: &amp;quot;TestAssignment&amp;quot;, directory_path: &amp;quot;TestAssignment&amp;quot;)&lt;br /&gt;
        create_list(:participant, 3)&lt;br /&gt;
        create(:topic, topic_name: &amp;quot;TestTopic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;submission&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;review&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;metareview&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;drop_topic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;signup&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;team_formation&amp;quot;)&lt;br /&gt;
        create(:deadline_right)&lt;br /&gt;
        create(:deadline_right, name: 'Late')&lt;br /&gt;
        create(:deadline_right, name: 'OK')&lt;br /&gt;
        create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
        (1..3).each do |i|&lt;br /&gt;
            create(:course, name: &amp;quot;Course #{i}&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        (1..3).each do |i|&lt;br /&gt;
            create(:questionnaire, name: &amp;quot;ReviewQuestionnaire#{i}&amp;quot;)&lt;br /&gt;
            create(:questionnaire, name: &amp;quot;AuthorFeedbackQuestionnaire#{i}&amp;quot;, type: 'AuthorFeedbackQuestionnaire')&lt;br /&gt;
            create(:questionnaire, name: &amp;quot;TeammateReviewQuestionnaire#{i}&amp;quot;, type: 'TeammateReviewQuestionnaire')&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def signup_topic&lt;br /&gt;
        user = User.find_by(name: &amp;quot;student2064&amp;quot;)&lt;br /&gt;
        stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
        visit '/student_task/list'&lt;br /&gt;
        visit '/sign_up_sheet/sign_up?id=1&amp;amp;topic_id=1' # signup topic&lt;br /&gt;
        visit '/student_task/list'&lt;br /&gt;
        click_link &amp;quot;TestAssignment&amp;quot;&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Your work&amp;quot;)&lt;br /&gt;
        click_link &amp;quot;Your work&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;can create assignment with supplementary review questoinnaire&amp;quot; do&lt;br /&gt;
        # Instructor logs in and visits the page of assignment creation&lt;br /&gt;
        login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
        visit '/assignments/new?private=1'&lt;br /&gt;
        &lt;br /&gt;
        # Fill in the form under 'General'&lt;br /&gt;
        fill_in 'assignment_form_assignment_name', with: 'test assignment'&lt;br /&gt;
        select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in 'assignment_form_assignment_directory_path', with: 'test directory'&lt;br /&gt;
        check(&amp;quot;team_assignment&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
        # Fill in the form under 'Rubrics'&lt;br /&gt;
        click_link 'Rubrics'&lt;br /&gt;
&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_ReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
            select &amp;quot;ReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_AuthorFeedbackQuestionnaire&amp;quot;) do&lt;br /&gt;
            select &amp;quot;AuthorFeedbackQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
            select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        # Fill in the form under Review strategy&lt;br /&gt;
        click_link 'Review strategy'&lt;br /&gt;
        check 'assignment_form_assignment_is_supplementary_review_enabled'&lt;br /&gt;
&lt;br /&gt;
        # Click to create the assignment&lt;br /&gt;
        click_button 'Create'&lt;br /&gt;
  &lt;br /&gt;
        # check if the assignment is created successfully&lt;br /&gt;
        assignment = Assignment.where(name: 'test assignment').first&lt;br /&gt;
        expect(assignment).to have_attributes(&lt;br /&gt;
            is_supplementary_review_enabled: true&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;can add supplementary review questions&amp;quot; do&lt;br /&gt;
        signup_topic&lt;br /&gt;
        click_link 'Create/Edit Supplementary Review Questionnaire'&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Edit Review&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''spec/models/team_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe '.get_supplementary_review_questionnaire_id_of_team' do&lt;br /&gt;
    it 'return supplementary_review_questionnaire_id of team' do&lt;br /&gt;
        allow(Team).to receive(:find).with(1).and_return(team)&lt;br /&gt;
       expect(Team.get_supplementary_review_questionnaire_id_of_team(1)).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UI Test ===&lt;br /&gt;
&lt;br /&gt;
1. When a new assignment is created, the instructor can enable supplementary questionnaire via the highlighted checkbox.&lt;br /&gt;
&lt;br /&gt;
  a. Log in as an instructor, create a new assignment.&amp;lt;br&amp;gt;&lt;br /&gt;
  b. In the Review Strategy table, check &amp;quot;Allow student-generated questions added to rubric?&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. Create two teams each containing two students.&lt;br /&gt;
&lt;br /&gt;
[[File:create_new_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
2. In the submit stage, all team members can create and edit one supplementary quetionnaire to their team.&lt;br /&gt;
&lt;br /&gt;
  a. Impersonate as a student, there will be a link to &amp;quot;create supplementary review questionnaire&amp;quot; as highlighted, in the &amp;quot;Your work&amp;quot; page.&amp;lt;br&amp;gt;&lt;br /&gt;
  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.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. Switch to another member of the same team, then you will be able to modify the same supplementary questionnaire.&lt;br /&gt;
&lt;br /&gt;
[[File:create_supplementary_questionnaire.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:create_supplementary_questionnaire_2.png]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
  a. Revert as instructor, change the due date to make it forward to review stage.&amp;lt;br&amp;gt;&lt;br /&gt;
  b. Impersonate as every student.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. Request a review, then begin it, edit, save, submit, and view the responses.&amp;lt;br&amp;gt;&lt;br /&gt;
  d. The questionnaire will completely include both parts, and your responses will correctly show in the view page.&lt;br /&gt;
&lt;br /&gt;
[[File:view_responses_reviewer.png]]&lt;br /&gt;
&lt;br /&gt;
4. After review stage, team members can view the list of all the scores and responses of the complete questionnaire of their team.&lt;br /&gt;
&lt;br /&gt;
  a. Impersonate as any student.&amp;lt;br&amp;gt;&lt;br /&gt;
  b. Click on &amp;quot;Your score&amp;quot; to see all the scores and responses of your complete questionnaire.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. The table correctly shows the scores and respones from reviewers.&amp;lt;br&amp;gt;&lt;br /&gt;
  d. Click on &amp;quot;toggle question list&amp;quot; to see your questionaire. It correctly includes both parts.&lt;br /&gt;
&lt;br /&gt;
[[File:view_your_score.png]]&lt;br /&gt;
&lt;br /&gt;
== Files added/modified ==&lt;br /&gt;
&lt;br /&gt;
All modifications are included in the [https://github.com/expertiza/expertiza/pull/1658 Pull Request].&lt;br /&gt;
&lt;br /&gt;
'''A new class SupplementaryReviewQuestionnaire (subclass of Questionnaire) is created.'''&lt;br /&gt;
&lt;br /&gt;
app/controllers/supplementary_review_questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/models/supplementary_review_questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
app/models/questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
'''A new boolean column :is_supplementary_review_enabled is added to Assignment.'''&lt;br /&gt;
&lt;br /&gt;
db/migrate/20191126025227_add_is_supplementary_review_enabled_to_assignment.rb&lt;br /&gt;
&lt;br /&gt;
'''Routes related to SupplementaryReviewQuestionnaire are updated.'''&lt;br /&gt;
&lt;br /&gt;
config/routes.rb&lt;br /&gt;
&lt;br /&gt;
'''A new integer column :supplementary_review_questionnaire_id is added to Team.'''&lt;br /&gt;
&lt;br /&gt;
app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
db/migrate/20191126032312_add_supplementary_review_questionnaire_id_to_team.rb&lt;br /&gt;
&lt;br /&gt;
'''Supplementary questions are found and added into controllers and views.'''&lt;br /&gt;
&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/response_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/helpers/grades_helper.rb&lt;br /&gt;
&lt;br /&gt;
app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
app/views/response/response.html.erb&lt;br /&gt;
&lt;br /&gt;
'''Modifications on view pages including checkbox and links.'''&lt;br /&gt;
&lt;br /&gt;
app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/submitted_content/_main.html.erb&lt;br /&gt;
&lt;br /&gt;
'''Tests added or modified.'''&lt;br /&gt;
&lt;br /&gt;
spec/controllers/questionnaires_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/controllers/supplementary_review_questionnaires_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/controllers/supplementary_review_questionnaires_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/factories/factories.rb&lt;br /&gt;
&lt;br /&gt;
spec/features/supplementary_review_questionnaire_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/models/assignment_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/models/team_spec.rb&lt;br /&gt;
&lt;br /&gt;
== Team members ==&lt;br /&gt;
Hua Cao&lt;br /&gt;
&lt;br /&gt;
Heng Yu&lt;br /&gt;
&lt;br /&gt;
Chien-Yuan Wang&lt;br /&gt;
&lt;br /&gt;
Benjamin Ding&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
Expertiza on Github:&lt;br /&gt;
&lt;br /&gt;
https://github.com/Jas0nch/expertiza/tree/beta&lt;br /&gt;
&lt;br /&gt;
Pull Request:&lt;br /&gt;
&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/1658 Issue #1658]&lt;br /&gt;
&lt;br /&gt;
Pull Request History:&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/6 Add supplementary questions for students]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/8 Supplementary questionnaire and responses can be correctly shown, edited, and stored.]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/9 Add supplementary questions in grades controller]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/10 Add supplementary questions for retrieve_questins method]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/11 Add test for questionnares_controller and .get_supplementary_review_questionnaire_id_of_team.]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/12 Add tests for check box and link in your work and fix bugs]&lt;br /&gt;
&lt;br /&gt;
Video:&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/yeAjjgaV10w&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=130814</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=130814"/>
		<updated>2019-12-07T03:05:45Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The github repository is https://github.com/Jas0nch/expertiza. And the demo video in youtube is ...&lt;br /&gt;
&lt;br /&gt;
== Proposed solution ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Design Strategy ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
1. there should be a checkbox when creating the whole questionnaire to indicate whether this questionnaire will have supplemental review questions or not. &lt;br /&gt;
&lt;br /&gt;
2. there should be a button that has the content &amp;quot;add supplemental questions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  a. if you click that button, it will redirect to a page that an instructor uses to create a supplemental questionnaire.&lt;br /&gt;
&lt;br /&gt;
  b. when the supplemental questionnaire is created, it should append to the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. After the reviewer finished the review, student can find the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
How we will do this:&lt;br /&gt;
&lt;br /&gt;
1. add a variable in the questionnaire class.&lt;br /&gt;
&lt;br /&gt;
2. add another file for a supplemental questionnaire and save them to the database.&lt;br /&gt;
&lt;br /&gt;
3. add a method to get the corresponding supplemental questionnaire and to add questions into the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
4. we should add another method to show the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
=== Modifications in the User Interface (Todo) === &lt;br /&gt;
&lt;br /&gt;
1. Assignment Creation Page in Instructor's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
2. Your Work Page in A Student's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
3. Review Rubrics Creation Page&lt;br /&gt;
&lt;br /&gt;
In this page, students are able to create supplementary review questions regarding the specifics of their own assignments.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases == &lt;br /&gt;
&lt;br /&gt;
[[File:Use_Cases.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== RSpec Test ===&lt;br /&gt;
&lt;br /&gt;
Firstly, we need to add tests to check the following basic functionalities of Supplementary Review Questionnaire:&lt;br /&gt;
&lt;br /&gt;
* There should be no link for &amp;quot;Supplementary Review Questionnaire&amp;quot; for team members or reviewerss, if the instructor disables this section in Assignment Creation Page.&lt;br /&gt;
&lt;br /&gt;
* If the instructor enables this section, the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; should appear in the &amp;quot;Your Work&amp;quot; section of a student, and redirect to Review Rubrics Creation Page.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* After a reviewer saves or submits, the responses to the supplementary review questions should be stored and appear when (s)he views that review.&lt;br /&gt;
&lt;br /&gt;
* After review deadline, all responses to the supplementary review questions of reviewers should appear in Review Results Page of a student.&lt;br /&gt;
&lt;br /&gt;
Besides, we need to add more tests to check other relevant functionalities and possible edge-cases as following:&lt;br /&gt;
&lt;br /&gt;
* After review deadline, a student should be able to give feedback by tagging the responses to the supplementary review questions, and the labels should be successfully displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test Results ===&lt;br /&gt;
&lt;br /&gt;
'''spec/controllers/supplementary_review_questionnaires_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe SupplementaryReviewQuestionnairesController do&lt;br /&gt;
    let(:team) { build(:assignment_team, id: 1, name: &amp;quot;team1&amp;quot;, assignment: assignment) }&lt;br /&gt;
    let(:student1) { build(:student, id: 1, name: &amp;quot;student1&amp;quot;) }&lt;br /&gt;
    let(:student2) { build(:student, id: 2, name: &amp;quot;student2&amp;quot;) }&lt;br /&gt;
    let(:participant) { build(:participant, id: 1, user: student1, assignment: assignment) }&lt;br /&gt;
    let(:participant2) { build(:participant, id: 2, user: student2, assignment: assignment) }&lt;br /&gt;
    let(:assignment) { build(:assignment, id: 1) }&lt;br /&gt;
&lt;br /&gt;
    # test the method of create_supplementary_review_questionnaire&lt;br /&gt;
    describe '#create_supplementary_review_questionnaire' do&lt;br /&gt;
        it 'redirects to questionnaires#edit page after create a new supplementary review questionnaire' do&lt;br /&gt;
            session = {user: student1}&lt;br /&gt;
            allow(AssignmentParticipant).to receive(:find).with('1').and_return(participant) &lt;br /&gt;
            allow(participant).to receive(:team).and_return(team)&lt;br /&gt;
            allow(Team).to receive(:find).with(1).and_return(team) &lt;br /&gt;
            params = {id: 1}&lt;br /&gt;
            get :create_supplementary_review_questionnaire, params, session&lt;br /&gt;
            expect(response).to redirect_to(&amp;quot;/supplementary_review_questionnaires/#{team.supplementary_review_questionnaire_id}/edit&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''spec/features/supplementary_review_questionnaire_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe &amp;quot;Supplementary Review Questionnaire&amp;quot;, js: true do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
        create(:assignment, name: &amp;quot;TestAssignment&amp;quot;, directory_path: &amp;quot;TestAssignment&amp;quot;)&lt;br /&gt;
        create_list(:participant, 3)&lt;br /&gt;
        create(:topic, topic_name: &amp;quot;TestTopic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;submission&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;review&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;metareview&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;drop_topic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;signup&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;team_formation&amp;quot;)&lt;br /&gt;
        create(:deadline_right)&lt;br /&gt;
        create(:deadline_right, name: 'Late')&lt;br /&gt;
        create(:deadline_right, name: 'OK')&lt;br /&gt;
        create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
        (1..3).each do |i|&lt;br /&gt;
            create(:course, name: &amp;quot;Course #{i}&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        (1..3).each do |i|&lt;br /&gt;
            create(:questionnaire, name: &amp;quot;ReviewQuestionnaire#{i}&amp;quot;)&lt;br /&gt;
            create(:questionnaire, name: &amp;quot;AuthorFeedbackQuestionnaire#{i}&amp;quot;, type: 'AuthorFeedbackQuestionnaire')&lt;br /&gt;
            create(:questionnaire, name: &amp;quot;TeammateReviewQuestionnaire#{i}&amp;quot;, type: 'TeammateReviewQuestionnaire')&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def signup_topic&lt;br /&gt;
        user = User.find_by(name: &amp;quot;student2064&amp;quot;)&lt;br /&gt;
        stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
        visit '/student_task/list'&lt;br /&gt;
        visit '/sign_up_sheet/sign_up?id=1&amp;amp;topic_id=1' # signup topic&lt;br /&gt;
        visit '/student_task/list'&lt;br /&gt;
        click_link &amp;quot;TestAssignment&amp;quot;&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Your work&amp;quot;)&lt;br /&gt;
        click_link &amp;quot;Your work&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;can create assignment with supplementary review questoinnaire&amp;quot; do&lt;br /&gt;
        # Instructor logs in and visits the page of assignment creation&lt;br /&gt;
        login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
        visit '/assignments/new?private=1'&lt;br /&gt;
        &lt;br /&gt;
        # Fill in the form under 'General'&lt;br /&gt;
        fill_in 'assignment_form_assignment_name', with: 'test assignment'&lt;br /&gt;
        select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in 'assignment_form_assignment_directory_path', with: 'test directory'&lt;br /&gt;
        check(&amp;quot;team_assignment&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
        # Fill in the form under 'Rubrics'&lt;br /&gt;
        click_link 'Rubrics'&lt;br /&gt;
&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_ReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
            select &amp;quot;ReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_AuthorFeedbackQuestionnaire&amp;quot;) do&lt;br /&gt;
            select &amp;quot;AuthorFeedbackQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
            select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        # Fill in the form under Review strategy&lt;br /&gt;
        click_link 'Review strategy'&lt;br /&gt;
        check 'assignment_form_assignment_is_supplementary_review_enabled'&lt;br /&gt;
&lt;br /&gt;
        # Click to create the assignment&lt;br /&gt;
        click_button 'Create'&lt;br /&gt;
  &lt;br /&gt;
        # check if the assignment is created successfully&lt;br /&gt;
        assignment = Assignment.where(name: 'test assignment').first&lt;br /&gt;
        expect(assignment).to have_attributes(&lt;br /&gt;
            is_supplementary_review_enabled: true&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;can add supplementary review questions&amp;quot; do&lt;br /&gt;
        signup_topic&lt;br /&gt;
        click_link 'Create/Edit Supplementary Review Questionnaire'&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Edit Review&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''spec/models/team_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe '.get_supplementary_review_questionnaire_id_of_team' do&lt;br /&gt;
    it 'return supplementary_review_questionnaire_id of team' do&lt;br /&gt;
        allow(Team).to receive(:find).with(1).and_return(team)&lt;br /&gt;
       expect(Team.get_supplementary_review_questionnaire_id_of_team(1)).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UI Test ===&lt;br /&gt;
&lt;br /&gt;
1. When a new assignment is created, the instructor can enable supplementary questionnaire via the highlighted checkbox.&lt;br /&gt;
&lt;br /&gt;
  a. Log in as an instructor, create a new assignment.&amp;lt;br&amp;gt;&lt;br /&gt;
  b. In the Review Strategy table, check &amp;quot;Allow student-generated questions added to rubric?&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. Create two teams each containing two students.&lt;br /&gt;
&lt;br /&gt;
[[File:create_new_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
2. In the submit stage, all team members can create and edit one supplementary quetionnaire to their team.&lt;br /&gt;
&lt;br /&gt;
  a. Impersonate as a student, there will be a link to &amp;quot;create supplementary review questionnaire&amp;quot; as highlighted, in the &amp;quot;Your work&amp;quot; page.&amp;lt;br&amp;gt;&lt;br /&gt;
  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.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. Switch to another member of the same team, then you will be able to modify the same supplementary questionnaire.&lt;br /&gt;
&lt;br /&gt;
[[File:create_supplementary_questionnaire.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:create_supplementary_questionnaire_2.png]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
  a. Revert as instructor, change the due date to make it forward to review stage.&amp;lt;br&amp;gt;&lt;br /&gt;
  b. Impersonate as every student.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. Request a review, then begin it, edit, save, submit, and view the responses.&amp;lt;br&amp;gt;&lt;br /&gt;
  d. The questionnaire will completely include both parts, and your responses will correctly show in the view page.&lt;br /&gt;
&lt;br /&gt;
[[File:view_responses_reviewer.png]]&lt;br /&gt;
&lt;br /&gt;
4. After review stage, team members can view the list of all the scores and responses of the complete questionnaire of their team.&lt;br /&gt;
&lt;br /&gt;
  a. Impersonate as any student.&amp;lt;br&amp;gt;&lt;br /&gt;
  b. Click on &amp;quot;Your score&amp;quot; to see all the scores and responses of your complete questionnaire.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. The table correctly shows the scores and respones from reviewers.&amp;lt;br&amp;gt;&lt;br /&gt;
  d. Click on &amp;quot;toggle question list&amp;quot; to see your questionaire. It correctly includes both parts.&lt;br /&gt;
&lt;br /&gt;
[[File:view_your_score.png]]&lt;br /&gt;
&lt;br /&gt;
== Files added/modified ==&lt;br /&gt;
&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/response_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/supplementary_review_questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/models/questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
app/models/supplementary_review_questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
app/views/response/response.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/submitted_content/_main.html.erb&lt;br /&gt;
&lt;br /&gt;
config/routes.rb&lt;br /&gt;
&lt;br /&gt;
db/migrate/20191126032312_add_supplementary_review_questionnaire_id_to_team.rb&lt;br /&gt;
&lt;br /&gt;
spec/controllers/questionnaires_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/controllers/supplementary_review_questionnaires_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/factories/factories.rb&lt;br /&gt;
&lt;br /&gt;
spec/features/supplementary_review_questionnaire_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/models/assignment_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/models/team_spec.rb&lt;br /&gt;
&lt;br /&gt;
== Team members ==&lt;br /&gt;
Hua Cao&lt;br /&gt;
&lt;br /&gt;
Heng Yu&lt;br /&gt;
&lt;br /&gt;
Chien-Yuan Wang&lt;br /&gt;
&lt;br /&gt;
Benjamin Ding&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
Expertiza on Github:&lt;br /&gt;
&lt;br /&gt;
https://github.com/Jas0nch/expertiza/tree/beta&lt;br /&gt;
&lt;br /&gt;
Pull Request:&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/6 Add supplementary questions for students]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/8 Supplementary questionnaire and responses can be correctly shown, edited, and stored.]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/9 Add supplementary questions in grades controller]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/10 Add supplementary questions for retrieve_questins method]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/11 Add test case of questionnaires_controller and .get_supplementary_review_questionnaire_id_of_team.]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/12 Add tests for check box and link in your work and fix bugs]&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=130813</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=130813"/>
		<updated>2019-12-07T03:04:28Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The github repository is [https://github.com/Jas0nch/expertiza]&lt;br /&gt;
&lt;br /&gt;
== Proposed solution ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Design Strategy ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
1. there should be a checkbox when creating the whole questionnaire to indicate whether this questionnaire will have supplemental review questions or not. &lt;br /&gt;
&lt;br /&gt;
2. there should be a button that has the content &amp;quot;add supplemental questions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  a. if you click that button, it will redirect to a page that an instructor uses to create a supplemental questionnaire.&lt;br /&gt;
&lt;br /&gt;
  b. when the supplemental questionnaire is created, it should append to the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. After the reviewer finished the review, student can find the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
How we will do this:&lt;br /&gt;
&lt;br /&gt;
1. add a variable in the questionnaire class.&lt;br /&gt;
&lt;br /&gt;
2. add another file for a supplemental questionnaire and save them to the database.&lt;br /&gt;
&lt;br /&gt;
3. add a method to get the corresponding supplemental questionnaire and to add questions into the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
4. we should add another method to show the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
=== Modifications in the User Interface (Todo) === &lt;br /&gt;
&lt;br /&gt;
1. Assignment Creation Page in Instructor's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
2. Your Work Page in A Student's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
3. Review Rubrics Creation Page&lt;br /&gt;
&lt;br /&gt;
In this page, students are able to create supplementary review questions regarding the specifics of their own assignments.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases == &lt;br /&gt;
&lt;br /&gt;
[[File:Use_Cases.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== RSpec Test ===&lt;br /&gt;
&lt;br /&gt;
Firstly, we need to add tests to check the following basic functionalities of Supplementary Review Questionnaire:&lt;br /&gt;
&lt;br /&gt;
* There should be no link for &amp;quot;Supplementary Review Questionnaire&amp;quot; for team members or reviewerss, if the instructor disables this section in Assignment Creation Page.&lt;br /&gt;
&lt;br /&gt;
* If the instructor enables this section, the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; should appear in the &amp;quot;Your Work&amp;quot; section of a student, and redirect to Review Rubrics Creation Page.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* After a reviewer saves or submits, the responses to the supplementary review questions should be stored and appear when (s)he views that review.&lt;br /&gt;
&lt;br /&gt;
* After review deadline, all responses to the supplementary review questions of reviewers should appear in Review Results Page of a student.&lt;br /&gt;
&lt;br /&gt;
Besides, we need to add more tests to check other relevant functionalities and possible edge-cases as following:&lt;br /&gt;
&lt;br /&gt;
* After review deadline, a student should be able to give feedback by tagging the responses to the supplementary review questions, and the labels should be successfully displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test Results ===&lt;br /&gt;
&lt;br /&gt;
'''spec/controllers/supplementary_review_questionnaires_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe SupplementaryReviewQuestionnairesController do&lt;br /&gt;
    let(:team) { build(:assignment_team, id: 1, name: &amp;quot;team1&amp;quot;, assignment: assignment) }&lt;br /&gt;
    let(:student1) { build(:student, id: 1, name: &amp;quot;student1&amp;quot;) }&lt;br /&gt;
    let(:student2) { build(:student, id: 2, name: &amp;quot;student2&amp;quot;) }&lt;br /&gt;
    let(:participant) { build(:participant, id: 1, user: student1, assignment: assignment) }&lt;br /&gt;
    let(:participant2) { build(:participant, id: 2, user: student2, assignment: assignment) }&lt;br /&gt;
    let(:assignment) { build(:assignment, id: 1) }&lt;br /&gt;
&lt;br /&gt;
    # test the method of create_supplementary_review_questionnaire&lt;br /&gt;
    describe '#create_supplementary_review_questionnaire' do&lt;br /&gt;
        it 'redirects to questionnaires#edit page after create a new supplementary review questionnaire' do&lt;br /&gt;
            session = {user: student1}&lt;br /&gt;
            allow(AssignmentParticipant).to receive(:find).with('1').and_return(participant) &lt;br /&gt;
            allow(participant).to receive(:team).and_return(team)&lt;br /&gt;
            allow(Team).to receive(:find).with(1).and_return(team) &lt;br /&gt;
            params = {id: 1}&lt;br /&gt;
            get :create_supplementary_review_questionnaire, params, session&lt;br /&gt;
            expect(response).to redirect_to(&amp;quot;/supplementary_review_questionnaires/#{team.supplementary_review_questionnaire_id}/edit&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''spec/features/supplementary_review_questionnaire_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe &amp;quot;Supplementary Review Questionnaire&amp;quot;, js: true do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
        create(:assignment, name: &amp;quot;TestAssignment&amp;quot;, directory_path: &amp;quot;TestAssignment&amp;quot;)&lt;br /&gt;
        create_list(:participant, 3)&lt;br /&gt;
        create(:topic, topic_name: &amp;quot;TestTopic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;submission&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;review&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;metareview&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;drop_topic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;signup&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;team_formation&amp;quot;)&lt;br /&gt;
        create(:deadline_right)&lt;br /&gt;
        create(:deadline_right, name: 'Late')&lt;br /&gt;
        create(:deadline_right, name: 'OK')&lt;br /&gt;
        create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
        (1..3).each do |i|&lt;br /&gt;
            create(:course, name: &amp;quot;Course #{i}&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        (1..3).each do |i|&lt;br /&gt;
            create(:questionnaire, name: &amp;quot;ReviewQuestionnaire#{i}&amp;quot;)&lt;br /&gt;
            create(:questionnaire, name: &amp;quot;AuthorFeedbackQuestionnaire#{i}&amp;quot;, type: 'AuthorFeedbackQuestionnaire')&lt;br /&gt;
            create(:questionnaire, name: &amp;quot;TeammateReviewQuestionnaire#{i}&amp;quot;, type: 'TeammateReviewQuestionnaire')&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def signup_topic&lt;br /&gt;
        user = User.find_by(name: &amp;quot;student2064&amp;quot;)&lt;br /&gt;
        stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
        visit '/student_task/list'&lt;br /&gt;
        visit '/sign_up_sheet/sign_up?id=1&amp;amp;topic_id=1' # signup topic&lt;br /&gt;
        visit '/student_task/list'&lt;br /&gt;
        click_link &amp;quot;TestAssignment&amp;quot;&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Your work&amp;quot;)&lt;br /&gt;
        click_link &amp;quot;Your work&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;can create assignment with supplementary review questoinnaire&amp;quot; do&lt;br /&gt;
        # Instructor logs in and visits the page of assignment creation&lt;br /&gt;
        login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
        visit '/assignments/new?private=1'&lt;br /&gt;
        &lt;br /&gt;
        # Fill in the form under 'General'&lt;br /&gt;
        fill_in 'assignment_form_assignment_name', with: 'test assignment'&lt;br /&gt;
        select('Course 2', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in 'assignment_form_assignment_directory_path', with: 'test directory'&lt;br /&gt;
        check(&amp;quot;team_assignment&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
        # Fill in the form under 'Rubrics'&lt;br /&gt;
        click_link 'Rubrics'&lt;br /&gt;
&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_ReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
            select &amp;quot;ReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_AuthorFeedbackQuestionnaire&amp;quot;) do&lt;br /&gt;
            select &amp;quot;AuthorFeedbackQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        within(:css, &amp;quot;tr#questionnaire_table_TeammateReviewQuestionnaire&amp;quot;) do&lt;br /&gt;
            select &amp;quot;TeammateReviewQuestionnaire2&amp;quot;, from: 'assignment_form[assignment_questionnaire][][questionnaire_id]'&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        # Fill in the form under Review strategy&lt;br /&gt;
        click_link 'Review strategy'&lt;br /&gt;
        check 'assignment_form_assignment_is_supplementary_review_enabled'&lt;br /&gt;
&lt;br /&gt;
        # Click to create the assignment&lt;br /&gt;
        click_button 'Create'&lt;br /&gt;
  &lt;br /&gt;
        # check if the assignment is created successfully&lt;br /&gt;
        assignment = Assignment.where(name: 'test assignment').first&lt;br /&gt;
        expect(assignment).to have_attributes(&lt;br /&gt;
            is_supplementary_review_enabled: true&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;can add supplementary review questions&amp;quot; do&lt;br /&gt;
        signup_topic&lt;br /&gt;
        click_link 'Create/Edit Supplementary Review Questionnaire'&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Edit Review&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''spec/models/team_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe '.get_supplementary_review_questionnaire_id_of_team' do&lt;br /&gt;
    it 'return supplementary_review_questionnaire_id of team' do&lt;br /&gt;
        allow(Team).to receive(:find).with(1).and_return(team)&lt;br /&gt;
       expect(Team.get_supplementary_review_questionnaire_id_of_team(1)).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UI Test ===&lt;br /&gt;
&lt;br /&gt;
1. When a new assignment is created, the instructor can enable supplementary questionnaire via the highlighted checkbox.&lt;br /&gt;
&lt;br /&gt;
  a. Log in as an instructor, create a new assignment.&amp;lt;br&amp;gt;&lt;br /&gt;
  b. In the Review Strategy table, check &amp;quot;Allow student-generated questions added to rubric?&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. Create two teams each containing two students.&lt;br /&gt;
&lt;br /&gt;
[[File:create_new_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
2. In the submit stage, all team members can create and edit one supplementary quetionnaire to their team.&lt;br /&gt;
&lt;br /&gt;
  a. Impersonate as a student, there will be a link to &amp;quot;create supplementary review questionnaire&amp;quot; as highlighted, in the &amp;quot;Your work&amp;quot; page.&amp;lt;br&amp;gt;&lt;br /&gt;
  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.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. Switch to another member of the same team, then you will be able to modify the same supplementary questionnaire.&lt;br /&gt;
&lt;br /&gt;
[[File:create_supplementary_questionnaire.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:create_supplementary_questionnaire_2.png]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
  a. Revert as instructor, change the due date to make it forward to review stage.&amp;lt;br&amp;gt;&lt;br /&gt;
  b. Impersonate as every student.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. Request a review, then begin it, edit, save, submit, and view the responses.&amp;lt;br&amp;gt;&lt;br /&gt;
  d. The questionnaire will completely include both parts, and your responses will correctly show in the view page.&lt;br /&gt;
&lt;br /&gt;
[[File:view_responses_reviewer.png]]&lt;br /&gt;
&lt;br /&gt;
4. After review stage, team members can view the list of all the scores and responses of the complete questionnaire of their team.&lt;br /&gt;
&lt;br /&gt;
  a. Impersonate as any student.&amp;lt;br&amp;gt;&lt;br /&gt;
  b. Click on &amp;quot;Your score&amp;quot; to see all the scores and responses of your complete questionnaire.&amp;lt;br&amp;gt;&lt;br /&gt;
  c. The table correctly shows the scores and respones from reviewers.&amp;lt;br&amp;gt;&lt;br /&gt;
  d. Click on &amp;quot;toggle question list&amp;quot; to see your questionaire. It correctly includes both parts.&lt;br /&gt;
&lt;br /&gt;
[[File:view_your_score.png]]&lt;br /&gt;
&lt;br /&gt;
== Files added/modified ==&lt;br /&gt;
&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/response_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/controllers/supplementary_review_questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
app/models/questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
app/models/supplementary_review_questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
app/views/response/response.html.erb&lt;br /&gt;
&lt;br /&gt;
app/views/submitted_content/_main.html.erb&lt;br /&gt;
&lt;br /&gt;
config/routes.rb&lt;br /&gt;
&lt;br /&gt;
db/migrate/20191126032312_add_supplementary_review_questionnaire_id_to_team.rb&lt;br /&gt;
&lt;br /&gt;
spec/controllers/questionnaires_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/controllers/supplementary_review_questionnaires_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/factories/factories.rb&lt;br /&gt;
&lt;br /&gt;
spec/features/supplementary_review_questionnaire_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/models/assignment_spec.rb&lt;br /&gt;
&lt;br /&gt;
spec/models/team_spec.rb&lt;br /&gt;
&lt;br /&gt;
== Team members ==&lt;br /&gt;
Hua Cao&lt;br /&gt;
&lt;br /&gt;
Heng Yu&lt;br /&gt;
&lt;br /&gt;
Chien-Yuan Wang&lt;br /&gt;
&lt;br /&gt;
Benjamin Ding&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
Expertiza on Github:&lt;br /&gt;
&lt;br /&gt;
https://github.com/Jas0nch/expertiza/tree/beta&lt;br /&gt;
&lt;br /&gt;
Pull Request:&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/6 Add supplementary questions for students]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/8 Supplementary questionnaire and responses can be correctly shown, edited, and stored.]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/9 Add supplementary questions in grades controller]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/10 Add supplementary questions for retrieve_questins method]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/11 Add test case of questionnaires_controller and .get_supplementary_review_questionnaire_id_of_team.]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/Jas0nch/expertiza/pull/12 Add tests for check box and link in your work and fix bugs]&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=129301</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=129301"/>
		<updated>2019-11-13T17:51:38Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Proposed solution ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Design Strategy ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
1. there should be a checkbox when creating the whole questionnaire to indicate whether this questionnaire will have supplemental review questions or not. &lt;br /&gt;
&lt;br /&gt;
2. there should be a button that has the content &amp;quot;add supplemental questions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  a. if you click that button, it will redirect to a page that an instructor uses to create a supplemental questionnaire.&lt;br /&gt;
&lt;br /&gt;
  b. when the supplemental questionnaire is created, it should append to the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. After the reviewer finished the review, student can find the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
How we will do this:&lt;br /&gt;
&lt;br /&gt;
1. add a variable in the questionnaire class.&lt;br /&gt;
&lt;br /&gt;
2. add another file for a supplemental questionnaire and save them to the database.&lt;br /&gt;
&lt;br /&gt;
3. add a method to get the corresponding supplemental questionnaire and to add questions into the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
4. we should add another method to show the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
=== Modifications in the User Interface (Todo) === &lt;br /&gt;
&lt;br /&gt;
1. Assignment Creation Page in Instructor's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
2. Your Work Page in A Student's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
3. Review Rubrics Creation Page&lt;br /&gt;
&lt;br /&gt;
In this page, students are able to create supplementary review questions regarding the specifics of their own assignments.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases == &lt;br /&gt;
&lt;br /&gt;
[[File:Use_Cases.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== RSpec Test ===&lt;br /&gt;
&lt;br /&gt;
Firstly, we need to add tests to check the following basic functionalities of Supplementary Review Questionnaire:&lt;br /&gt;
&lt;br /&gt;
* There should be no link for &amp;quot;Supplementary Review Questionnaire&amp;quot; for team members or reviewerss, if the instructor disables this section in Assignment Creation Page.&lt;br /&gt;
&lt;br /&gt;
* If the instructor enables this section, the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; should appear in the &amp;quot;Your Work&amp;quot; section of a student, and redirect to Review Rubrics Creation Page.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* After a reviewer saves or submits, the responses to the supplementary review questions should be stored and appear when (s)he views that review.&lt;br /&gt;
&lt;br /&gt;
* After review deadline, all responses to the supplementary review questions of reviewers should appear in Review Results Page of a student.&lt;br /&gt;
&lt;br /&gt;
Besides, we need to add more tests to check other relevant functionalities and possible edge-cases as following:&lt;br /&gt;
&lt;br /&gt;
* After review deadline, a student should be able to mark labels on the responses to the supplementary review questions, and the labels should be successfully displayed.&lt;br /&gt;
&lt;br /&gt;
* To be continued...&lt;br /&gt;
&lt;br /&gt;
=== UI Test (Todo)===&lt;br /&gt;
&lt;br /&gt;
== File which are added/modified ==&lt;br /&gt;
&lt;br /&gt;
Note: Because the pull request contains some code irrelevant to this project which make it confusing, we post our code here for you to read clearly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team members ==&lt;br /&gt;
Hua Cao&lt;br /&gt;
&lt;br /&gt;
Heng Yu&lt;br /&gt;
&lt;br /&gt;
Chien-Yuan Wang&lt;br /&gt;
&lt;br /&gt;
Benjamin Ding&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
Expertiza on Github:https://github.com/zyczyh/expertiza&lt;br /&gt;
&lt;br /&gt;
Pull Request:https://github.com/expertiza/expertiza/pull/1325&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:https://youtu.be/3PUNknSbU-k&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128499</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128499"/>
		<updated>2019-11-11T03:29:49Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Design Strategy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
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 (E1879) 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Proposed solution ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Design Strategy ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
1. there should be a checkbox when creating the whole questionnaire to indicate whether this questionnaire will have supplemental review questions or not. &lt;br /&gt;
&lt;br /&gt;
2. there should be a button that has the content &amp;quot;add supplemental questions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  a. if you click that button, it will redirect to a page that an instructor uses to create a supplemental questionnaire.&lt;br /&gt;
&lt;br /&gt;
  b. when the supplemental questionnaire is created, it should append to the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. After the reviewer finished the review, student can find the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
How we will do this:&lt;br /&gt;
&lt;br /&gt;
1. add a variable in the questionnaire class.&lt;br /&gt;
&lt;br /&gt;
2. add another file for a supplemental questionnaire and save them to the database.&lt;br /&gt;
&lt;br /&gt;
3. add a method to get the corresponding supplemental questionnaire and to add questions into the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
4. we should add another method to show the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
=== Modifications in the User Interface (Todo) === &lt;br /&gt;
&lt;br /&gt;
1. Assignment Creation Page in Instructor's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
2. Your Work Page in A Student's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
3. Review Rubrics Creation Page&lt;br /&gt;
&lt;br /&gt;
In this page, students are able to create supplementary review questions regarding the specifics of their own assignments.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases == &lt;br /&gt;
&lt;br /&gt;
1. Use case of creating a Supplementary Review Questionnaire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Use case of reviewing questions for reviewers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Use case of reviewing responses of questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Actually, we need to add tests for the following:&lt;br /&gt;
&lt;br /&gt;
1. To check the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; appears in the &amp;quot;Your Work&amp;quot; section of a student.&lt;br /&gt;
&lt;br /&gt;
2. To check if the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; redirects to page which allows to create questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. To check if the questionnaire ID is stored in the Team table.&lt;br /&gt;
&lt;br /&gt;
4. To check if the reviewers can see the supplementary questions that were added by the team as part of the review questions.&lt;br /&gt;
&lt;br /&gt;
5. To check if the responses of the Supplementary Review Questions have been added to the responses of the existing review questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== File which are added/modified ==&lt;br /&gt;
&lt;br /&gt;
Note: Because the pull request contains some code irrelevant to this project which make it confusing, we post our code here for you to read clearly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team members ==&lt;br /&gt;
Hua Cao&lt;br /&gt;
&lt;br /&gt;
Heng Yu&lt;br /&gt;
&lt;br /&gt;
Jianshu Zhang&lt;br /&gt;
&lt;br /&gt;
Zirun Han&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
Expertiza on Github:https://github.com/zyczyh/expertiza&lt;br /&gt;
&lt;br /&gt;
Pull Request:https://github.com/expertiza/expertiza/pull/1325&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:https://youtu.be/3PUNknSbU-k&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128498</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128498"/>
		<updated>2019-11-11T03:29:28Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
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 (E1879) 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Proposed solution ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Design Strategy ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
1. there should be a checkbox when creating the whole questionnaire to indicate whether this questionnaire will have supplemental review questions or not. &lt;br /&gt;
&lt;br /&gt;
2. there should be a button that has the content &amp;quot;add supplemental questions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  2.a. if you click that button, it will redirect to a page that an instructor uses to create a supplemental questionnaire.&lt;br /&gt;
&lt;br /&gt;
  2.b. when the supplemental questionnaire is created, it should append to the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. After the reviewer finished the review, student can find the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
How we will do this:&lt;br /&gt;
&lt;br /&gt;
1. add a variable in the questionnaire class.&lt;br /&gt;
&lt;br /&gt;
2. add another file for a supplemental questionnaire and save them to the database.&lt;br /&gt;
&lt;br /&gt;
3. add a method to get the corresponding supplemental questionnaire and to add questions into the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
4. we should add another method to show the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
=== Modifications in the User Interface (Todo) === &lt;br /&gt;
&lt;br /&gt;
1. Assignment Creation Page in Instructor's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
2. Your Work Page in A Student's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
3. Review Rubrics Creation Page&lt;br /&gt;
&lt;br /&gt;
In this page, students are able to create supplementary review questions regarding the specifics of their own assignments.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases == &lt;br /&gt;
&lt;br /&gt;
1. Use case of creating a Supplementary Review Questionnaire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Use case of reviewing questions for reviewers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Use case of reviewing responses of questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Actually, we need to add tests for the following:&lt;br /&gt;
&lt;br /&gt;
1. To check the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; appears in the &amp;quot;Your Work&amp;quot; section of a student.&lt;br /&gt;
&lt;br /&gt;
2. To check if the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; redirects to page which allows to create questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. To check if the questionnaire ID is stored in the Team table.&lt;br /&gt;
&lt;br /&gt;
4. To check if the reviewers can see the supplementary questions that were added by the team as part of the review questions.&lt;br /&gt;
&lt;br /&gt;
5. To check if the responses of the Supplementary Review Questions have been added to the responses of the existing review questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== File which are added/modified ==&lt;br /&gt;
&lt;br /&gt;
Note: Because the pull request contains some code irrelevant to this project which make it confusing, we post our code here for you to read clearly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team members ==&lt;br /&gt;
Hua Cao&lt;br /&gt;
&lt;br /&gt;
Heng Yu&lt;br /&gt;
&lt;br /&gt;
Jianshu Zhang&lt;br /&gt;
&lt;br /&gt;
Zirun Han&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
Expertiza on Github:https://github.com/zyczyh/expertiza&lt;br /&gt;
&lt;br /&gt;
Pull Request:https://github.com/expertiza/expertiza/pull/1325&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:https://youtu.be/3PUNknSbU-k&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128497</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128497"/>
		<updated>2019-11-11T03:29:14Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
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 (E1879) 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Proposed solution ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Design Strategy ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
1. there should be a checkbox when creating the whole questionnaire to indicate whether this questionnaire will have supplemental review questions or not. &lt;br /&gt;
&lt;br /&gt;
2. there should be a button that has the content &amp;quot;add supplemental questions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
2.a. if you click that button, it will redirect to a page that an instructor uses to create a supplemental questionnaire.&lt;br /&gt;
&lt;br /&gt;
2.b. when the supplemental questionnaire is created, it should append to the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. After the reviewer finished the review, student can find the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
How we will do this:&lt;br /&gt;
&lt;br /&gt;
1. add a variable in the questionnaire class.&lt;br /&gt;
&lt;br /&gt;
2. add another file for a supplemental questionnaire and save them to the database.&lt;br /&gt;
&lt;br /&gt;
3. add a method to get the corresponding supplemental questionnaire and to add questions into the existed questionnaire.&lt;br /&gt;
&lt;br /&gt;
4. we should add another method to show the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
=== Modifications in the User Interface (Todo) === &lt;br /&gt;
&lt;br /&gt;
1. Assignment Creation Page in Instructor's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
2. Your Work Page in A Student's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
3. Review Rubrics Creation Page&lt;br /&gt;
&lt;br /&gt;
In this page, students are able to create supplementary review questions regarding the specifics of their own assignments.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases == &lt;br /&gt;
&lt;br /&gt;
1. Use case of creating a Supplementary Review Questionnaire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Use case of reviewing questions for reviewers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Use case of reviewing responses of questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Actually, we need to add tests for the following:&lt;br /&gt;
&lt;br /&gt;
1. To check the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; appears in the &amp;quot;Your Work&amp;quot; section of a student.&lt;br /&gt;
&lt;br /&gt;
2. To check if the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; redirects to page which allows to create questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. To check if the questionnaire ID is stored in the Team table.&lt;br /&gt;
&lt;br /&gt;
4. To check if the reviewers can see the supplementary questions that were added by the team as part of the review questions.&lt;br /&gt;
&lt;br /&gt;
5. To check if the responses of the Supplementary Review Questions have been added to the responses of the existing review questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== File which are added/modified ==&lt;br /&gt;
&lt;br /&gt;
Note: Because the pull request contains some code irrelevant to this project which make it confusing, we post our code here for you to read clearly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team members ==&lt;br /&gt;
Hua Cao&lt;br /&gt;
&lt;br /&gt;
Heng Yu&lt;br /&gt;
&lt;br /&gt;
Jianshu Zhang&lt;br /&gt;
&lt;br /&gt;
Zirun Han&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
Expertiza on Github:https://github.com/zyczyh/expertiza&lt;br /&gt;
&lt;br /&gt;
Pull Request:https://github.com/expertiza/expertiza/pull/1325&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:https://youtu.be/3PUNknSbU-k&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128495</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128495"/>
		<updated>2019-11-11T03:27:57Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Design Strategy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
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 (E1879) 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Proposed solution ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Design Strategy ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== 1 ====&lt;br /&gt;
there should be a checkbox when creating the whole questionnaire to indicate whether this questionnaire will have supplemental review questions or not. &lt;br /&gt;
==== 2 ====&lt;br /&gt;
there should be a button that has the content &amp;quot;add supplemental questions&amp;quot;.&lt;br /&gt;
===== 2.a =====&lt;br /&gt;
if you click that button, it will redirect to a page that an instructor uses to create a supplemental questionnaire.&lt;br /&gt;
===== 2.b =====&lt;br /&gt;
when the supplemental questionnaire is created, it should append to the existed questionnaire.&lt;br /&gt;
==== 3 ====&lt;br /&gt;
After the reviewer finished the review, student can find the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
How we will do this:&lt;br /&gt;
&lt;br /&gt;
==== 1 ====&lt;br /&gt;
add a variable in the questionnaire class.&lt;br /&gt;
==== 2 ====&lt;br /&gt;
add another file for a supplemental questionnaire and save them to the database.&lt;br /&gt;
==== 3 ====&lt;br /&gt;
add a method to get the corresponding supplemental questionnaire and to add questions into the existed questionnaire.&lt;br /&gt;
==== 4 ====&lt;br /&gt;
we should add another method to show the supplemental questionnaire in the review page.&lt;br /&gt;
&lt;br /&gt;
=== Modifications in the User Interface (Todo) === &lt;br /&gt;
&lt;br /&gt;
1. Assignment Creation Page in Instructor's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
2. Your Work Page in A Student's Account&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
3. Review Rubrics Creation Page&lt;br /&gt;
&lt;br /&gt;
In this page, students are able to create supplementary review questions regarding the specifics of their own assignments.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases == &lt;br /&gt;
&lt;br /&gt;
1. Use case of creating a Supplementary Review Questionnaire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Use case of reviewing questions for reviewers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Use case of reviewing responses of questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Actually, we need to add tests for the following:&lt;br /&gt;
&lt;br /&gt;
1. To check the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; appears in the &amp;quot;Your Work&amp;quot; section of a student.&lt;br /&gt;
&lt;br /&gt;
2. To check if the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; redirects to page which allows to create questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. To check if the questionnaire ID is stored in the Team table.&lt;br /&gt;
&lt;br /&gt;
4. To check if the reviewers can see the supplementary questions that were added by the team as part of the review questions.&lt;br /&gt;
&lt;br /&gt;
5. To check if the responses of the Supplementary Review Questions have been added to the responses of the existing review questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== File which are added/modified ==&lt;br /&gt;
&lt;br /&gt;
Note: Because the pull request contains some code irrelevant to this project which make it confusing, we post our code here for you to read clearly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team members ==&lt;br /&gt;
Hua Cao&lt;br /&gt;
&lt;br /&gt;
Heng Yu&lt;br /&gt;
&lt;br /&gt;
Jianshu Zhang&lt;br /&gt;
&lt;br /&gt;
Zirun Han&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
Expertiza on Github:https://github.com/zyczyh/expertiza&lt;br /&gt;
&lt;br /&gt;
Pull Request:https://github.com/expertiza/expertiza/pull/1325&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:https://youtu.be/3PUNknSbU-k&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128384</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128384"/>
		<updated>2019-11-11T01:46:52Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
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 (E1879) 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Proposed solution ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Design Strategy ===&lt;br /&gt;
&lt;br /&gt;
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). So that we will add a new subclass of Questionnaire named SupplementaryReviewQuestionnaire to achieve our goal.&lt;br /&gt;
 &lt;br /&gt;
First, we want the professor to control if the students can create their own supplementary questions by using a checkbox to indicate. If the professor allow students to create their own questions, there will be a button in the students &amp;quot;Your work&amp;quot; page which can let the students jump to the same page that an instructor lands on when creating a new rubric. Then we will add the questionnaire id of this new SupplementaryReviewQuestionnaire to the Team table when students create their own questionnaire in order to show the corresponding supplementary questions to the reviewers. And when showing review questions to the reviewers we will look up the questionnaire id in Team table and modify the view to add the supplementary questions to review page. Finally, after the reviewers finish the review and submit their responds, we will change the view and let the team member can see the feedback of their supplementary questions.&lt;br /&gt;
&lt;br /&gt;
=== Changes in the User Interface === &lt;br /&gt;
&lt;br /&gt;
1. Assignment Page&lt;br /&gt;
&lt;br /&gt;
We add a checkbox for the professor to indicate if student can add their own questions.&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
2. A button called &amp;quot;Create Supplementary Rubric&amp;quot; will appear in the student's &amp;quot;Your Work&amp;quot; section when the Instructor has allowed students to create supplementary review questions. So when a student clicks the button he/she can add the desired questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. The page where student will be directed to when he/she clicks the Create Supplementary Rubric button. Students can add Questions to the created Supplementary Review questionnaire here.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
The students own supplementary questions are leading by a heading &amp;quot;Supplementary Review Questions&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
The supplementary review results will be showed to the team like other results. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Use Cases == &lt;br /&gt;
&lt;br /&gt;
1. Use case of creating a Supplementary Review Questionnaire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Use case of reviewing questions for reviewers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Use case of reviewing responses of questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Actually, we need to add tests for the following:&lt;br /&gt;
&lt;br /&gt;
1. To check the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; appears in the &amp;quot;Your Work&amp;quot; section of a student.&lt;br /&gt;
&lt;br /&gt;
2. To check if the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; redirects to page which allows to create questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. To check if the questionnaire ID is stored in the Team table.&lt;br /&gt;
&lt;br /&gt;
4. To check if the reviewers can see the supplementary questions that were added by the team as part of the review questions.&lt;br /&gt;
&lt;br /&gt;
5. To check if the responses of the Supplementary Review Questions have been added to the responses of the existing review questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== File which are added/modified ==&lt;br /&gt;
&lt;br /&gt;
Note: Because the pull request contains some code irrelevant to this project which make it confusing, we post our code here for you to read clearly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Team members ==&lt;br /&gt;
Yanchen Zhao&lt;br /&gt;
&lt;br /&gt;
Pingping Chen&lt;br /&gt;
&lt;br /&gt;
Jianshu Zhang&lt;br /&gt;
&lt;br /&gt;
Zirun Han&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
Expertiza on Github:https://github.com/zyczyh/expertiza&lt;br /&gt;
&lt;br /&gt;
Pull Request:https://github.com/expertiza/expertiza/pull/1325&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:https://youtu.be/3PUNknSbU-k&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128377</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128377"/>
		<updated>2019-11-11T01:43:25Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
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 (E1879) 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proposed solution ===&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
''Design Strategy''&lt;br /&gt;
&lt;br /&gt;
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). So that we will add a new subclass of Questionnaire named SupplementaryReviewQuestionnaire to achieve our goal.&lt;br /&gt;
 &lt;br /&gt;
First, we want the professor to control if the students can create their own supplementary questions by using a checkbox to indicate. If the professor allow students to create their own questions, there will be a button in the students &amp;quot;Your work&amp;quot; page which can let the students jump to the same page that an instructor lands on when creating a new rubric. Then we will add the questionnaire id of this new SupplementaryReviewQuestionnaire to the Team table when students create their own questionnaire in order to show the corresponding supplementary questions to the reviewers. And when showing review questions to the reviewers we will look up the questionnaire id in Team table and modify the view to add the supplementary questions to review page. Finally, after the reviewers finish the review and submit their responds, we will change the view and let the team member can see the feedback of their supplementary questions.&lt;br /&gt;
&lt;br /&gt;
''Changes in the User Interface''&lt;br /&gt;
&lt;br /&gt;
1. Assignment Page&lt;br /&gt;
&lt;br /&gt;
We add a checkbox for the professor to indicate if student can add their own questions.&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
2. A button called &amp;quot;Create Supplementary Rubric&amp;quot; will appear in the student's &amp;quot;Your Work&amp;quot; section when the Instructor has allowed students to create supplementary review questions. So when a student clicks the button he/she can add the desired questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. The page where student will be directed to when he/she clicks the Create Supplementary Rubric button. Students can add Questions to the created Supplementary Review questionnaire here.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
The students own supplementary questions are leading by a heading &amp;quot;Supplementary Review Questions&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
The supplementary review results will be showed to the team like other results. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''Use Cases'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
1. Use case of creating a Supplementary Review Questionnaire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Use case of reviewing questions for reviewers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Use case of reviewing responses of questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Plan'''&lt;br /&gt;
----&lt;br /&gt;
Actually, we need to add tests for the following:&lt;br /&gt;
&lt;br /&gt;
1. To check the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; appears in the &amp;quot;Your Work&amp;quot; section of a student.&lt;br /&gt;
&lt;br /&gt;
2. To check if the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; redirects to page which allows to create questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. To check if the questionnaire ID is stored in the Team table.&lt;br /&gt;
&lt;br /&gt;
4. To check if the reviewers can see the supplementary questions that were added by the team as part of the review questions.&lt;br /&gt;
&lt;br /&gt;
5. To check if the responses of the Supplementary Review Questions have been added to the responses of the existing review questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''File which are added/modified'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Note: Because the pull request contains some code irrelevant to this project which make it confusing, we post our code here for you to read clearly.&lt;br /&gt;
&lt;br /&gt;
1. Models&lt;br /&gt;
&lt;br /&gt;
app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
Look up the questionnaire ID of a team.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.get_supplementary_review_questionnaire_id_of_team(team_id)&lt;br /&gt;
    team = Team.find(team_id)&lt;br /&gt;
    if team.blank?&lt;br /&gt;
      nil&lt;br /&gt;
    else&lt;br /&gt;
      team.supplementary_review_questionnaire_id&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/supplementary_review_questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
Add the SupplementaryReviewQuestionnaire class which is the subclass of Questionnaire.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # This is one type of Questionnaire and  as intuitively expected this model class&lt;br /&gt;
 # derives from Questionnaire.&lt;br /&gt;
 class SupplementaryReviewQuestionnaire &amp;lt; Questionnaire&lt;br /&gt;
   # Make me better.&lt;br /&gt;
   attr_accessible&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review responses to &amp;quot;Show Review&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def construct_review_response code, self_id, show_tags = nil, current_user = nil&lt;br /&gt;
    code += '&amp;lt;table id=&amp;quot;review_' + self_id + '&amp;quot; style=&amp;quot;display: none;&amp;quot; class=&amp;quot;table table-bordered&amp;quot;&amp;gt;'&lt;br /&gt;
    answers = Answer.where(response_id: self.response_id)&lt;br /&gt;
    team_id = response_map.reviewee_id&lt;br /&gt;
    supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(team_id)&lt;br /&gt;
    unless answers.empty?&lt;br /&gt;
      questionnaire = self.questionnaire_by_answer(answers.first)&lt;br /&gt;
&lt;br /&gt;
      unless supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        supplementary_review_questionnaire = Questionnaire.find(supplementary_review_questionnaire_id)&lt;br /&gt;
        supplementary_review_questions = supplementary_review_questionnaire.questions.sort_by(&amp;amp;:seq)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      questionnaire_max = questionnaire.max_question_score&lt;br /&gt;
      questions = questionnaire.questions.sort_by(&amp;amp;:seq)&lt;br /&gt;
&lt;br /&gt;
      unless supplementary_review_questionnaire.nil?&lt;br /&gt;
        questions += supplementary_review_questions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      # get the tag settings this questionnaire&lt;br /&gt;
      tag_prompt_deployments = show_tags ? TagPromptDeployment.where(questionnaire_id: questionnaire.id, assignment_id: self.map.assignment.id) : nil&lt;br /&gt;
      code = add_table_rows questionnaire_max, questions, answers, code, tag_prompt_deployments, current_user&lt;br /&gt;
    end&lt;br /&gt;
    comment = if !self.additional_comment.nil?&lt;br /&gt;
                self.additional_comment.gsub('^p', '').gsub(/\n/, '&amp;lt;BR/&amp;gt;')&lt;br /&gt;
              else&lt;br /&gt;
                ''&lt;br /&gt;
              end&lt;br /&gt;
    code += '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Additional Comment: &amp;lt;/b&amp;gt;' + comment + '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;br /&gt;
    code += '&amp;lt;/table&amp;gt;'&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Views:&lt;br /&gt;
&lt;br /&gt;
app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add checkbox which professor used to indicate whether students can create their own questions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!--Add a allow studuent-generated questionnaires checkbox. --&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_form[assignment][supplementary_review_questionnaire]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_form[assignment][supplementary_review_questionnaire]', 'true', @assignment_form.assignment.supplementary_review_questionnaire) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_form[assignment][supplementary_review_questionnaire]', 'Allow student-generated questions added to rubric?') %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/response/response.html.erb&lt;br /&gt;
&lt;br /&gt;
Add code to show the supplementary questions to the reviewers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;br&amp;gt;&lt;br /&gt;
       &amp;lt;% unless @supplementary_review_questions.nil? %&amp;gt;&lt;br /&gt;
       &amp;lt;tr&amp;gt;&lt;br /&gt;
         &amp;lt;td&amp;gt;&lt;br /&gt;
           &amp;lt;h2&amp;gt;Supplementary Review Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
       &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;% @supplementary_review_questions.each do |question| %&amp;gt;&lt;br /&gt;
         &amp;lt;tr&amp;gt;&lt;br /&gt;
           &amp;lt;td&amp;gt;&lt;br /&gt;
             &amp;lt;% answer = Answer.where(question_id: question.id, response_id: @response.id).first if !@response.nil? %&amp;gt;&lt;br /&gt;
             &amp;lt;% if question.instance_of? Criterion %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score, @dropdown_or_scale) %&amp;gt;&lt;br /&gt;
               &amp;lt;%= tinymce %&amp;gt;&lt;br /&gt;
             &amp;lt;% elsif question.instance_of? Scale %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score) %&amp;gt;&lt;br /&gt;
               &amp;lt;%= tinymce %&amp;gt;&lt;br /&gt;
             &amp;lt;% elsif question.instance_of? UploadFile %&amp;gt;&lt;br /&gt;
             &amp;lt;% else %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer) %&amp;gt;&lt;br /&gt;
             &amp;lt;% end %&amp;gt;&lt;br /&gt;
           &amp;lt;/td&amp;gt;&lt;br /&gt;
           &amp;lt;td width=&amp;quot;25%&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;% if [Criterion, TextArea].include? question.class %&amp;gt;&lt;br /&gt;
                 &amp;lt;div id=&amp;quot;analysis_&amp;lt;%= i.to_s %&amp;gt;_comments&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
             &amp;lt;% end %&amp;gt;&lt;br /&gt;
           &amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;% i += 1 %&amp;gt;&lt;br /&gt;
         &amp;lt;% end %&amp;gt;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/submitted_content/_main.html.erb&lt;br /&gt;
&lt;br /&gt;
Add button for &amp;quot;your work&amp;quot; page to let students create their own questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if stage != &amp;quot;Finished&amp;quot; and controller.controller_name == 'submitted_content' and @can_submit %&amp;gt;&lt;br /&gt;
  &amp;lt;h2&amp;gt;Add Supplementary Review Questions:&amp;lt;/h2&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.supplementary_review_questionnaire? %&amp;gt;&lt;br /&gt;
      &amp;lt;%= button_to &amp;quot;Create Supplementary Rubric&amp;quot;, {:controller =&amp;gt; &amp;quot;questionnaires&amp;quot;, :action =&amp;gt; &amp;quot;create_supplementary_review_questionnaire&amp;quot;, :id =&amp;gt; participant.id } %&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
      The instructor hasn't enabled this feature for this assignment&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Controllers:&lt;br /&gt;
&lt;br /&gt;
app/controllers/response_controller.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review questionnaires part to the create, edit, update methods and some other methods which getting the questionnaires.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # Prepare the parameters when student clicks &amp;quot;Edit&amp;quot;&lt;br /&gt;
  def edit&lt;br /&gt;
    assign_instance_vars&lt;br /&gt;
    get_all_responses&lt;br /&gt;
    if @prev.present?&lt;br /&gt;
      @sorted = @review_scores.sort {|m1, m2| m1.version_num.to_i &amp;amp;&amp;amp; m2.version_num.to_i ? m2.version_num.to_i &amp;lt;=&amp;gt; m1.version_num.to_i : (m1.version_num ? -1 : 1) }&lt;br /&gt;
      @largest_version_num = @sorted[0]&lt;br /&gt;
    end&lt;br /&gt;
    @modified_object = @response.response_id&lt;br /&gt;
    # set more handy variables for the view&lt;br /&gt;
    set_content&lt;br /&gt;
    @review_scores = []&lt;br /&gt;
    @questions.each do |question|&lt;br /&gt;
      @review_scores &amp;lt;&amp;lt; Answer.where(response_id: @response.response_id, question_id: question.id).first&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @supplementary_review_questions.each do |question|&lt;br /&gt;
      @review_scores &amp;lt;&amp;lt; Answer.where(response_id: @response.response_id, question_id: question.id).first&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @questionnaire = set_questionnaire&lt;br /&gt;
    render action: 'response'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Update the response and answers when student &amp;quot;edit&amp;quot; existing response&lt;br /&gt;
  def update&lt;br /&gt;
    render nothing: true unless action_allowed?&lt;br /&gt;
    # the response to be updated&lt;br /&gt;
    @response = Response.find(params[:id])&lt;br /&gt;
    msg = &amp;quot;&amp;quot;&lt;br /&gt;
    begin&lt;br /&gt;
      @map = @response.map&lt;br /&gt;
      @response.update_attribute('additional_comment', params[:review][:comments])&lt;br /&gt;
&lt;br /&gt;
      set_questionnaire&lt;br /&gt;
      questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
      supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
      unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
        questions += supplementary_review_questions&lt;br /&gt;
      end&lt;br /&gt;
      create_answers(params, questions) unless params[:responses].nil?&lt;br /&gt;
&lt;br /&gt;
      @response.update_attribute('is_submitted', true) if params['isSubmit'] &amp;amp;&amp;amp; params['isSubmit'] == 'Yes'&lt;br /&gt;
      @response.notify_instructor_on_difference if (@map.is_a? ReviewResponseMap) &amp;amp;&amp;amp; @response.is_submitted &amp;amp;&amp;amp; @response.significant_difference?&lt;br /&gt;
    rescue StandardError&lt;br /&gt;
      msg = &amp;quot;Your response was not saved. Cause:189 #{$ERROR_INFO}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Your response was submitted: #{@response.is_submitted}&amp;quot;, request)&lt;br /&gt;
    redirect_to controller: 'response', action: 'save', id: @map.map_id,&lt;br /&gt;
                return: params[:return], msg: msg, review: params[:review], save_options: params[:save_options]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
 def create&lt;br /&gt;
    map_id = params[:id]&lt;br /&gt;
    map_id = params[:map_id] unless params[:map_id].nil? # pass map_id as a hidden field in the review form&lt;br /&gt;
    @map = ResponseMap.find(map_id)&lt;br /&gt;
    @team_id = @map.reviewee_id&lt;br /&gt;
&lt;br /&gt;
    get_all_responses&lt;br /&gt;
    if params[:review][:questionnaire_id]&lt;br /&gt;
      @questionnaire = Questionnaire.find(params[:review][:questionnaire_id])&lt;br /&gt;
      @round = params[:review][:round]&lt;br /&gt;
      @supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@team_id)&lt;br /&gt;
      unless @supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        @supplementary_review_questionnaire = Questionnaire.find(@supplementary_review_questionnaire_id)&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      @round = nil&lt;br /&gt;
    end&lt;br /&gt;
    is_submitted = (params[:isSubmit] == 'Yes')&lt;br /&gt;
    was_submitted = false&lt;br /&gt;
    @response = Response.where(map_id: @map.id, round: @round.to_i).first&lt;br /&gt;
    if @response.nil?&lt;br /&gt;
      @response = Response.create(&lt;br /&gt;
        map_id: @map.id,&lt;br /&gt;
        additional_comment: params[:review][:comments],&lt;br /&gt;
        round: @round.to_i,&lt;br /&gt;
        is_submitted: is_submitted&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
    was_submitted = @response.is_submitted&lt;br /&gt;
    @response.update(additional_comment: params[:review][:comments], is_submitted: is_submitted) # ignore if autoupdate try to save when the response object is not yet created.&lt;br /&gt;
&lt;br /&gt;
    # ,:version_num=&amp;gt;@version)&lt;br /&gt;
    # Change the order for displaying questions for editing response views.&lt;br /&gt;
    questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
&lt;br /&gt;
    unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
      supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
      questions += supplementary_review_questions&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    create_answers(params, questions) if params[:responses]&lt;br /&gt;
    msg = &amp;quot;Your response was successfully saved.&amp;quot;&lt;br /&gt;
    error_msg = &amp;quot;&amp;quot;&lt;br /&gt;
    # only notify if is_submitted changes from false to true&lt;br /&gt;
    if (@map.is_a? ReviewResponseMap) &amp;amp;&amp;amp; (was_submitted == false &amp;amp;&amp;amp; @response.is_submitted) &amp;amp;&amp;amp; @response.significant_difference?&lt;br /&gt;
      @response.notify_instructor_on_difference&lt;br /&gt;
      @response.email&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'response', action: 'save', id: @map.map_id,&lt;br /&gt;
                return: params[:return], msg: msg, error_msg: error_msg, review: params[:review], save_options: params[:save_options]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  # new_response if a flag parameter indicating that if user is requesting a new rubric to fill&lt;br /&gt;
  # if true: we figure out which questionnaire to use based on current time and records in assignment_questionnaires table&lt;br /&gt;
  # e.g. student click &amp;quot;Begin&amp;quot; or &amp;quot;Update&amp;quot; to start filling out a rubric for others' work&lt;br /&gt;
  # if false: we figure out which questionnaire to display base on @response object&lt;br /&gt;
  # e.g. student click &amp;quot;Edit&amp;quot; or &amp;quot;View&amp;quot;&lt;br /&gt;
  def set_content(new_response = false)&lt;br /&gt;
    @title = @map.get_title&lt;br /&gt;
    if @map.survey?&lt;br /&gt;
      @survey_parent = @map.survey_parent&lt;br /&gt;
    else&lt;br /&gt;
      @assignment = @map.assignment&lt;br /&gt;
    end&lt;br /&gt;
    @participant = @map.reviewer&lt;br /&gt;
    @contributor = @map.contributor&lt;br /&gt;
    new_response ? set_questionnaire_for_new_response : set_questionnaire&lt;br /&gt;
    set_dropdown_or_scale&lt;br /&gt;
    @questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
&lt;br /&gt;
    unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
      @supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @min = @questionnaire.min_question_score&lt;br /&gt;
    @max = @questionnaire.max_question_score&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_questionnaire_for_new_response&lt;br /&gt;
    case @map.type&lt;br /&gt;
    when &amp;quot;ReviewResponseMap&amp;quot;, &amp;quot;SelfReviewResponseMap&amp;quot;&lt;br /&gt;
      reviewees_topic = SignedUpTeam.topic_id_by_team_id(@contributor.id)&lt;br /&gt;
      @current_round = @assignment.number_of_current_round(reviewees_topic)&lt;br /&gt;
      @questionnaire = @map.questionnaire(@current_round)&lt;br /&gt;
&lt;br /&gt;
      @supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@contributor.id)&lt;br /&gt;
      unless @supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        @supplementary_review_questionnaire = Questionnaire.find(@supplementary_review_questionnaire_id)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
    when&lt;br /&gt;
      &amp;quot;MetareviewResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;TeammateReviewResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;FeedbackResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;CourseSurveyResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;AssignmentSurveyResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;GlobalSurveyResponseMap&amp;quot;&lt;br /&gt;
      @questionnaire = @map.questionnaire&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_questionnaire&lt;br /&gt;
    # if user is not filling a new rubric, the @response object should be available.&lt;br /&gt;
    # we can find the questionnaire from the question_id in answers&lt;br /&gt;
    answer = @response.scores.first&lt;br /&gt;
    @questionnaire = @response.questionnaire_by_answer(answer)&lt;br /&gt;
&lt;br /&gt;
    supplementary_review_answer = @response.scores.last&lt;br /&gt;
    @supplementary_review_questionnaire = @response.questionnaire_by_answer(supplementary_review_answer)&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review responses to &amp;quot;Your Scores&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def view_team&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @team = @participant.team&lt;br /&gt;
    @team_id = @team.id&lt;br /&gt;
    @questions = {}&lt;br /&gt;
    questionnaires = @assignment.questionnaires&lt;br /&gt;
    retrieve_questions questionnaires&lt;br /&gt;
    @pscore = @participant.scores(@questions)&lt;br /&gt;
    @vmlist = []&lt;br /&gt;
&lt;br /&gt;
    # loop through each questionnaire, and populate the view model for all data necessary&lt;br /&gt;
    # to render the html tables.&lt;br /&gt;
    counter_for_same_rubric = 0&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      @round = nil&lt;br /&gt;
      if @assignment.varying_rubrics_by_round? &amp;amp;&amp;amp; questionnaire.type == &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
        questionnaires = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id)&lt;br /&gt;
        if questionnaires.count &amp;gt; 1&lt;br /&gt;
          @round = questionnaires[counter_for_same_rubric].used_in_round&lt;br /&gt;
          counter_for_same_rubric += 1&lt;br /&gt;
        else&lt;br /&gt;
          @round = questionnaires[0].used_in_round&lt;br /&gt;
          counter_for_same_rubric = 0&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      vm = VmQuestionResponse.new(questionnaire, @assignment, @round)&lt;br /&gt;
      supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@team_id)&lt;br /&gt;
      unless supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        supplementary_review_questionnaire = Questionnaire.find(supplementary_review_questionnaire_id)&lt;br /&gt;
        unless supplementary_review_questionnaire.nil?&lt;br /&gt;
          supplementary_review_questions = supplementary_review_questionnaire.questions&lt;br /&gt;
          questionnaire.questions += supplementary_review_questions&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      vmquestions = questionnaire.questions&lt;br /&gt;
      vm.add_questions(vmquestions)&lt;br /&gt;
      vm.add_team_members(@team)&lt;br /&gt;
      vm.add_reviews(@participant, @team, @assignment.varying_rubrics_by_round?)&lt;br /&gt;
      vm.get_number_of_comments_greater_than_10_words&lt;br /&gt;
      @vmlist &amp;lt;&amp;lt; vm&lt;br /&gt;
    end&lt;br /&gt;
    @current_role_name = current_role_name&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
Method for creating Supplementary Review Questionnaire.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   def create_supplementary_review_questionnaire&lt;br /&gt;
     @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
     @team = Team.find(@participant.team.id)&lt;br /&gt;
     if @team.supplementary_review_questionnaire_id.nil?&lt;br /&gt;
       @questionnaire = Questionnaire.create(privete: false, name: &amp;quot;supplementary_review_questionnaire_&amp;quot; + @team.id.to_s,&lt;br /&gt;
         instructor_id: @team_id, min_question_score: 0, max_question_score: 5, type: &amp;quot;Questionnaire&amp;quot;, display_type: &amp;quot;Review&amp;quot;&lt;br /&gt;
         instruction_loc: Questionnaire::DEFAULT_QUESTIONNAIRE_URL)&lt;br /&gt;
       if @questionnaire.save&lt;br /&gt;
         @team.supplementary_review_questionnaire_id = @questionnaire.id&lt;br /&gt;
         @team.save&lt;br /&gt;
         flash[:success] = 'You have successfully created a rubric!'&lt;br /&gt;
       else&lt;br /&gt;
         flash[:error] = $ERROR_INFO&lt;br /&gt;
       end&lt;br /&gt;
     else&lt;br /&gt;
       @questionnaire = Questionnaire.find(@team.supplementary_review_questionnaire_id)&lt;br /&gt;
     end&lt;br /&gt;
     redirect_to controller: 'questionnaires', action: 'edit', id: @questionnaire.id&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Config:&lt;br /&gt;
&lt;br /&gt;
routes.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  resources :questionnaires, only: %i[new create edit update] do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :copy&lt;br /&gt;
      get :list&lt;br /&gt;
      post :list_questionnaires&lt;br /&gt;
      get :new_quiz&lt;br /&gt;
      get :select_questionnaire_type&lt;br /&gt;
      post :select_questionnaire_type&lt;br /&gt;
      get :toggle_access&lt;br /&gt;
      get :view&lt;br /&gt;
      post :create_quiz_questionnaire&lt;br /&gt;
      post :update_quiz&lt;br /&gt;
      post :add_new_questions&lt;br /&gt;
      post :save_all_questions&lt;br /&gt;
      post :create_supplementary_review_questionnaire&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  resources :author_feedback_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :review_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :metareview_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :teammate_review_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :assignment_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :global_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :course_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :bookmarkrating_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :supplementary_review_questionnaire, controller: :questionnaires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Team members'''&lt;br /&gt;
----&lt;br /&gt;
Yanchen Zhao&lt;br /&gt;
&lt;br /&gt;
Pingping Chen&lt;br /&gt;
&lt;br /&gt;
Jianshu Zhang&lt;br /&gt;
&lt;br /&gt;
Zirun Han&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Links'''&lt;br /&gt;
----&lt;br /&gt;
Expertiza on Github:https://github.com/zyczyh/expertiza&lt;br /&gt;
&lt;br /&gt;
Pull Request:https://github.com/expertiza/expertiza/pull/1325&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:https://youtu.be/3PUNknSbU-k&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128374</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128374"/>
		<updated>2019-11-11T01:43:06Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction== &lt;br /&gt;
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 (E1879) 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed solution==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
''Design Strategy''&lt;br /&gt;
&lt;br /&gt;
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). So that we will add a new subclass of Questionnaire named SupplementaryReviewQuestionnaire to achieve our goal.&lt;br /&gt;
 &lt;br /&gt;
First, we want the professor to control if the students can create their own supplementary questions by using a checkbox to indicate. If the professor allow students to create their own questions, there will be a button in the students &amp;quot;Your work&amp;quot; page which can let the students jump to the same page that an instructor lands on when creating a new rubric. Then we will add the questionnaire id of this new SupplementaryReviewQuestionnaire to the Team table when students create their own questionnaire in order to show the corresponding supplementary questions to the reviewers. And when showing review questions to the reviewers we will look up the questionnaire id in Team table and modify the view to add the supplementary questions to review page. Finally, after the reviewers finish the review and submit their responds, we will change the view and let the team member can see the feedback of their supplementary questions.&lt;br /&gt;
&lt;br /&gt;
''Changes in the User Interface''&lt;br /&gt;
&lt;br /&gt;
1. Assignment Page&lt;br /&gt;
&lt;br /&gt;
We add a checkbox for the professor to indicate if student can add their own questions.&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
2. A button called &amp;quot;Create Supplementary Rubric&amp;quot; will appear in the student's &amp;quot;Your Work&amp;quot; section when the Instructor has allowed students to create supplementary review questions. So when a student clicks the button he/she can add the desired questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. The page where student will be directed to when he/she clicks the Create Supplementary Rubric button. Students can add Questions to the created Supplementary Review questionnaire here.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
The students own supplementary questions are leading by a heading &amp;quot;Supplementary Review Questions&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
The supplementary review results will be showed to the team like other results. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''Use Cases'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
1. Use case of creating a Supplementary Review Questionnaire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Use case of reviewing questions for reviewers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Use case of reviewing responses of questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Plan'''&lt;br /&gt;
----&lt;br /&gt;
Actually, we need to add tests for the following:&lt;br /&gt;
&lt;br /&gt;
1. To check the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; appears in the &amp;quot;Your Work&amp;quot; section of a student.&lt;br /&gt;
&lt;br /&gt;
2. To check if the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; redirects to page which allows to create questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. To check if the questionnaire ID is stored in the Team table.&lt;br /&gt;
&lt;br /&gt;
4. To check if the reviewers can see the supplementary questions that were added by the team as part of the review questions.&lt;br /&gt;
&lt;br /&gt;
5. To check if the responses of the Supplementary Review Questions have been added to the responses of the existing review questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''File which are added/modified'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Note: Because the pull request contains some code irrelevant to this project which make it confusing, we post our code here for you to read clearly.&lt;br /&gt;
&lt;br /&gt;
1. Models&lt;br /&gt;
&lt;br /&gt;
app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
Look up the questionnaire ID of a team.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.get_supplementary_review_questionnaire_id_of_team(team_id)&lt;br /&gt;
    team = Team.find(team_id)&lt;br /&gt;
    if team.blank?&lt;br /&gt;
      nil&lt;br /&gt;
    else&lt;br /&gt;
      team.supplementary_review_questionnaire_id&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/supplementary_review_questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
Add the SupplementaryReviewQuestionnaire class which is the subclass of Questionnaire.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # This is one type of Questionnaire and  as intuitively expected this model class&lt;br /&gt;
 # derives from Questionnaire.&lt;br /&gt;
 class SupplementaryReviewQuestionnaire &amp;lt; Questionnaire&lt;br /&gt;
   # Make me better.&lt;br /&gt;
   attr_accessible&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review responses to &amp;quot;Show Review&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def construct_review_response code, self_id, show_tags = nil, current_user = nil&lt;br /&gt;
    code += '&amp;lt;table id=&amp;quot;review_' + self_id + '&amp;quot; style=&amp;quot;display: none;&amp;quot; class=&amp;quot;table table-bordered&amp;quot;&amp;gt;'&lt;br /&gt;
    answers = Answer.where(response_id: self.response_id)&lt;br /&gt;
    team_id = response_map.reviewee_id&lt;br /&gt;
    supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(team_id)&lt;br /&gt;
    unless answers.empty?&lt;br /&gt;
      questionnaire = self.questionnaire_by_answer(answers.first)&lt;br /&gt;
&lt;br /&gt;
      unless supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        supplementary_review_questionnaire = Questionnaire.find(supplementary_review_questionnaire_id)&lt;br /&gt;
        supplementary_review_questions = supplementary_review_questionnaire.questions.sort_by(&amp;amp;:seq)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      questionnaire_max = questionnaire.max_question_score&lt;br /&gt;
      questions = questionnaire.questions.sort_by(&amp;amp;:seq)&lt;br /&gt;
&lt;br /&gt;
      unless supplementary_review_questionnaire.nil?&lt;br /&gt;
        questions += supplementary_review_questions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      # get the tag settings this questionnaire&lt;br /&gt;
      tag_prompt_deployments = show_tags ? TagPromptDeployment.where(questionnaire_id: questionnaire.id, assignment_id: self.map.assignment.id) : nil&lt;br /&gt;
      code = add_table_rows questionnaire_max, questions, answers, code, tag_prompt_deployments, current_user&lt;br /&gt;
    end&lt;br /&gt;
    comment = if !self.additional_comment.nil?&lt;br /&gt;
                self.additional_comment.gsub('^p', '').gsub(/\n/, '&amp;lt;BR/&amp;gt;')&lt;br /&gt;
              else&lt;br /&gt;
                ''&lt;br /&gt;
              end&lt;br /&gt;
    code += '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Additional Comment: &amp;lt;/b&amp;gt;' + comment + '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;br /&gt;
    code += '&amp;lt;/table&amp;gt;'&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Views:&lt;br /&gt;
&lt;br /&gt;
app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add checkbox which professor used to indicate whether students can create their own questions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!--Add a allow studuent-generated questionnaires checkbox. --&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_form[assignment][supplementary_review_questionnaire]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_form[assignment][supplementary_review_questionnaire]', 'true', @assignment_form.assignment.supplementary_review_questionnaire) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_form[assignment][supplementary_review_questionnaire]', 'Allow student-generated questions added to rubric?') %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/response/response.html.erb&lt;br /&gt;
&lt;br /&gt;
Add code to show the supplementary questions to the reviewers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;br&amp;gt;&lt;br /&gt;
       &amp;lt;% unless @supplementary_review_questions.nil? %&amp;gt;&lt;br /&gt;
       &amp;lt;tr&amp;gt;&lt;br /&gt;
         &amp;lt;td&amp;gt;&lt;br /&gt;
           &amp;lt;h2&amp;gt;Supplementary Review Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
       &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;% @supplementary_review_questions.each do |question| %&amp;gt;&lt;br /&gt;
         &amp;lt;tr&amp;gt;&lt;br /&gt;
           &amp;lt;td&amp;gt;&lt;br /&gt;
             &amp;lt;% answer = Answer.where(question_id: question.id, response_id: @response.id).first if !@response.nil? %&amp;gt;&lt;br /&gt;
             &amp;lt;% if question.instance_of? Criterion %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score, @dropdown_or_scale) %&amp;gt;&lt;br /&gt;
               &amp;lt;%= tinymce %&amp;gt;&lt;br /&gt;
             &amp;lt;% elsif question.instance_of? Scale %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score) %&amp;gt;&lt;br /&gt;
               &amp;lt;%= tinymce %&amp;gt;&lt;br /&gt;
             &amp;lt;% elsif question.instance_of? UploadFile %&amp;gt;&lt;br /&gt;
             &amp;lt;% else %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer) %&amp;gt;&lt;br /&gt;
             &amp;lt;% end %&amp;gt;&lt;br /&gt;
           &amp;lt;/td&amp;gt;&lt;br /&gt;
           &amp;lt;td width=&amp;quot;25%&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;% if [Criterion, TextArea].include? question.class %&amp;gt;&lt;br /&gt;
                 &amp;lt;div id=&amp;quot;analysis_&amp;lt;%= i.to_s %&amp;gt;_comments&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
             &amp;lt;% end %&amp;gt;&lt;br /&gt;
           &amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;% i += 1 %&amp;gt;&lt;br /&gt;
         &amp;lt;% end %&amp;gt;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/submitted_content/_main.html.erb&lt;br /&gt;
&lt;br /&gt;
Add button for &amp;quot;your work&amp;quot; page to let students create their own questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if stage != &amp;quot;Finished&amp;quot; and controller.controller_name == 'submitted_content' and @can_submit %&amp;gt;&lt;br /&gt;
  &amp;lt;h2&amp;gt;Add Supplementary Review Questions:&amp;lt;/h2&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.supplementary_review_questionnaire? %&amp;gt;&lt;br /&gt;
      &amp;lt;%= button_to &amp;quot;Create Supplementary Rubric&amp;quot;, {:controller =&amp;gt; &amp;quot;questionnaires&amp;quot;, :action =&amp;gt; &amp;quot;create_supplementary_review_questionnaire&amp;quot;, :id =&amp;gt; participant.id } %&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
      The instructor hasn't enabled this feature for this assignment&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Controllers:&lt;br /&gt;
&lt;br /&gt;
app/controllers/response_controller.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review questionnaires part to the create, edit, update methods and some other methods which getting the questionnaires.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # Prepare the parameters when student clicks &amp;quot;Edit&amp;quot;&lt;br /&gt;
  def edit&lt;br /&gt;
    assign_instance_vars&lt;br /&gt;
    get_all_responses&lt;br /&gt;
    if @prev.present?&lt;br /&gt;
      @sorted = @review_scores.sort {|m1, m2| m1.version_num.to_i &amp;amp;&amp;amp; m2.version_num.to_i ? m2.version_num.to_i &amp;lt;=&amp;gt; m1.version_num.to_i : (m1.version_num ? -1 : 1) }&lt;br /&gt;
      @largest_version_num = @sorted[0]&lt;br /&gt;
    end&lt;br /&gt;
    @modified_object = @response.response_id&lt;br /&gt;
    # set more handy variables for the view&lt;br /&gt;
    set_content&lt;br /&gt;
    @review_scores = []&lt;br /&gt;
    @questions.each do |question|&lt;br /&gt;
      @review_scores &amp;lt;&amp;lt; Answer.where(response_id: @response.response_id, question_id: question.id).first&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @supplementary_review_questions.each do |question|&lt;br /&gt;
      @review_scores &amp;lt;&amp;lt; Answer.where(response_id: @response.response_id, question_id: question.id).first&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @questionnaire = set_questionnaire&lt;br /&gt;
    render action: 'response'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Update the response and answers when student &amp;quot;edit&amp;quot; existing response&lt;br /&gt;
  def update&lt;br /&gt;
    render nothing: true unless action_allowed?&lt;br /&gt;
    # the response to be updated&lt;br /&gt;
    @response = Response.find(params[:id])&lt;br /&gt;
    msg = &amp;quot;&amp;quot;&lt;br /&gt;
    begin&lt;br /&gt;
      @map = @response.map&lt;br /&gt;
      @response.update_attribute('additional_comment', params[:review][:comments])&lt;br /&gt;
&lt;br /&gt;
      set_questionnaire&lt;br /&gt;
      questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
      supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
      unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
        questions += supplementary_review_questions&lt;br /&gt;
      end&lt;br /&gt;
      create_answers(params, questions) unless params[:responses].nil?&lt;br /&gt;
&lt;br /&gt;
      @response.update_attribute('is_submitted', true) if params['isSubmit'] &amp;amp;&amp;amp; params['isSubmit'] == 'Yes'&lt;br /&gt;
      @response.notify_instructor_on_difference if (@map.is_a? ReviewResponseMap) &amp;amp;&amp;amp; @response.is_submitted &amp;amp;&amp;amp; @response.significant_difference?&lt;br /&gt;
    rescue StandardError&lt;br /&gt;
      msg = &amp;quot;Your response was not saved. Cause:189 #{$ERROR_INFO}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Your response was submitted: #{@response.is_submitted}&amp;quot;, request)&lt;br /&gt;
    redirect_to controller: 'response', action: 'save', id: @map.map_id,&lt;br /&gt;
                return: params[:return], msg: msg, review: params[:review], save_options: params[:save_options]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
 def create&lt;br /&gt;
    map_id = params[:id]&lt;br /&gt;
    map_id = params[:map_id] unless params[:map_id].nil? # pass map_id as a hidden field in the review form&lt;br /&gt;
    @map = ResponseMap.find(map_id)&lt;br /&gt;
    @team_id = @map.reviewee_id&lt;br /&gt;
&lt;br /&gt;
    get_all_responses&lt;br /&gt;
    if params[:review][:questionnaire_id]&lt;br /&gt;
      @questionnaire = Questionnaire.find(params[:review][:questionnaire_id])&lt;br /&gt;
      @round = params[:review][:round]&lt;br /&gt;
      @supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@team_id)&lt;br /&gt;
      unless @supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        @supplementary_review_questionnaire = Questionnaire.find(@supplementary_review_questionnaire_id)&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      @round = nil&lt;br /&gt;
    end&lt;br /&gt;
    is_submitted = (params[:isSubmit] == 'Yes')&lt;br /&gt;
    was_submitted = false&lt;br /&gt;
    @response = Response.where(map_id: @map.id, round: @round.to_i).first&lt;br /&gt;
    if @response.nil?&lt;br /&gt;
      @response = Response.create(&lt;br /&gt;
        map_id: @map.id,&lt;br /&gt;
        additional_comment: params[:review][:comments],&lt;br /&gt;
        round: @round.to_i,&lt;br /&gt;
        is_submitted: is_submitted&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
    was_submitted = @response.is_submitted&lt;br /&gt;
    @response.update(additional_comment: params[:review][:comments], is_submitted: is_submitted) # ignore if autoupdate try to save when the response object is not yet created.&lt;br /&gt;
&lt;br /&gt;
    # ,:version_num=&amp;gt;@version)&lt;br /&gt;
    # Change the order for displaying questions for editing response views.&lt;br /&gt;
    questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
&lt;br /&gt;
    unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
      supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
      questions += supplementary_review_questions&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    create_answers(params, questions) if params[:responses]&lt;br /&gt;
    msg = &amp;quot;Your response was successfully saved.&amp;quot;&lt;br /&gt;
    error_msg = &amp;quot;&amp;quot;&lt;br /&gt;
    # only notify if is_submitted changes from false to true&lt;br /&gt;
    if (@map.is_a? ReviewResponseMap) &amp;amp;&amp;amp; (was_submitted == false &amp;amp;&amp;amp; @response.is_submitted) &amp;amp;&amp;amp; @response.significant_difference?&lt;br /&gt;
      @response.notify_instructor_on_difference&lt;br /&gt;
      @response.email&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'response', action: 'save', id: @map.map_id,&lt;br /&gt;
                return: params[:return], msg: msg, error_msg: error_msg, review: params[:review], save_options: params[:save_options]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  # new_response if a flag parameter indicating that if user is requesting a new rubric to fill&lt;br /&gt;
  # if true: we figure out which questionnaire to use based on current time and records in assignment_questionnaires table&lt;br /&gt;
  # e.g. student click &amp;quot;Begin&amp;quot; or &amp;quot;Update&amp;quot; to start filling out a rubric for others' work&lt;br /&gt;
  # if false: we figure out which questionnaire to display base on @response object&lt;br /&gt;
  # e.g. student click &amp;quot;Edit&amp;quot; or &amp;quot;View&amp;quot;&lt;br /&gt;
  def set_content(new_response = false)&lt;br /&gt;
    @title = @map.get_title&lt;br /&gt;
    if @map.survey?&lt;br /&gt;
      @survey_parent = @map.survey_parent&lt;br /&gt;
    else&lt;br /&gt;
      @assignment = @map.assignment&lt;br /&gt;
    end&lt;br /&gt;
    @participant = @map.reviewer&lt;br /&gt;
    @contributor = @map.contributor&lt;br /&gt;
    new_response ? set_questionnaire_for_new_response : set_questionnaire&lt;br /&gt;
    set_dropdown_or_scale&lt;br /&gt;
    @questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
&lt;br /&gt;
    unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
      @supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @min = @questionnaire.min_question_score&lt;br /&gt;
    @max = @questionnaire.max_question_score&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_questionnaire_for_new_response&lt;br /&gt;
    case @map.type&lt;br /&gt;
    when &amp;quot;ReviewResponseMap&amp;quot;, &amp;quot;SelfReviewResponseMap&amp;quot;&lt;br /&gt;
      reviewees_topic = SignedUpTeam.topic_id_by_team_id(@contributor.id)&lt;br /&gt;
      @current_round = @assignment.number_of_current_round(reviewees_topic)&lt;br /&gt;
      @questionnaire = @map.questionnaire(@current_round)&lt;br /&gt;
&lt;br /&gt;
      @supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@contributor.id)&lt;br /&gt;
      unless @supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        @supplementary_review_questionnaire = Questionnaire.find(@supplementary_review_questionnaire_id)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
    when&lt;br /&gt;
      &amp;quot;MetareviewResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;TeammateReviewResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;FeedbackResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;CourseSurveyResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;AssignmentSurveyResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;GlobalSurveyResponseMap&amp;quot;&lt;br /&gt;
      @questionnaire = @map.questionnaire&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_questionnaire&lt;br /&gt;
    # if user is not filling a new rubric, the @response object should be available.&lt;br /&gt;
    # we can find the questionnaire from the question_id in answers&lt;br /&gt;
    answer = @response.scores.first&lt;br /&gt;
    @questionnaire = @response.questionnaire_by_answer(answer)&lt;br /&gt;
&lt;br /&gt;
    supplementary_review_answer = @response.scores.last&lt;br /&gt;
    @supplementary_review_questionnaire = @response.questionnaire_by_answer(supplementary_review_answer)&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review responses to &amp;quot;Your Scores&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def view_team&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @team = @participant.team&lt;br /&gt;
    @team_id = @team.id&lt;br /&gt;
    @questions = {}&lt;br /&gt;
    questionnaires = @assignment.questionnaires&lt;br /&gt;
    retrieve_questions questionnaires&lt;br /&gt;
    @pscore = @participant.scores(@questions)&lt;br /&gt;
    @vmlist = []&lt;br /&gt;
&lt;br /&gt;
    # loop through each questionnaire, and populate the view model for all data necessary&lt;br /&gt;
    # to render the html tables.&lt;br /&gt;
    counter_for_same_rubric = 0&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      @round = nil&lt;br /&gt;
      if @assignment.varying_rubrics_by_round? &amp;amp;&amp;amp; questionnaire.type == &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
        questionnaires = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id)&lt;br /&gt;
        if questionnaires.count &amp;gt; 1&lt;br /&gt;
          @round = questionnaires[counter_for_same_rubric].used_in_round&lt;br /&gt;
          counter_for_same_rubric += 1&lt;br /&gt;
        else&lt;br /&gt;
          @round = questionnaires[0].used_in_round&lt;br /&gt;
          counter_for_same_rubric = 0&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      vm = VmQuestionResponse.new(questionnaire, @assignment, @round)&lt;br /&gt;
      supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@team_id)&lt;br /&gt;
      unless supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        supplementary_review_questionnaire = Questionnaire.find(supplementary_review_questionnaire_id)&lt;br /&gt;
        unless supplementary_review_questionnaire.nil?&lt;br /&gt;
          supplementary_review_questions = supplementary_review_questionnaire.questions&lt;br /&gt;
          questionnaire.questions += supplementary_review_questions&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      vmquestions = questionnaire.questions&lt;br /&gt;
      vm.add_questions(vmquestions)&lt;br /&gt;
      vm.add_team_members(@team)&lt;br /&gt;
      vm.add_reviews(@participant, @team, @assignment.varying_rubrics_by_round?)&lt;br /&gt;
      vm.get_number_of_comments_greater_than_10_words&lt;br /&gt;
      @vmlist &amp;lt;&amp;lt; vm&lt;br /&gt;
    end&lt;br /&gt;
    @current_role_name = current_role_name&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
Method for creating Supplementary Review Questionnaire.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   def create_supplementary_review_questionnaire&lt;br /&gt;
     @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
     @team = Team.find(@participant.team.id)&lt;br /&gt;
     if @team.supplementary_review_questionnaire_id.nil?&lt;br /&gt;
       @questionnaire = Questionnaire.create(privete: false, name: &amp;quot;supplementary_review_questionnaire_&amp;quot; + @team.id.to_s,&lt;br /&gt;
         instructor_id: @team_id, min_question_score: 0, max_question_score: 5, type: &amp;quot;Questionnaire&amp;quot;, display_type: &amp;quot;Review&amp;quot;&lt;br /&gt;
         instruction_loc: Questionnaire::DEFAULT_QUESTIONNAIRE_URL)&lt;br /&gt;
       if @questionnaire.save&lt;br /&gt;
         @team.supplementary_review_questionnaire_id = @questionnaire.id&lt;br /&gt;
         @team.save&lt;br /&gt;
         flash[:success] = 'You have successfully created a rubric!'&lt;br /&gt;
       else&lt;br /&gt;
         flash[:error] = $ERROR_INFO&lt;br /&gt;
       end&lt;br /&gt;
     else&lt;br /&gt;
       @questionnaire = Questionnaire.find(@team.supplementary_review_questionnaire_id)&lt;br /&gt;
     end&lt;br /&gt;
     redirect_to controller: 'questionnaires', action: 'edit', id: @questionnaire.id&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Config:&lt;br /&gt;
&lt;br /&gt;
routes.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  resources :questionnaires, only: %i[new create edit update] do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :copy&lt;br /&gt;
      get :list&lt;br /&gt;
      post :list_questionnaires&lt;br /&gt;
      get :new_quiz&lt;br /&gt;
      get :select_questionnaire_type&lt;br /&gt;
      post :select_questionnaire_type&lt;br /&gt;
      get :toggle_access&lt;br /&gt;
      get :view&lt;br /&gt;
      post :create_quiz_questionnaire&lt;br /&gt;
      post :update_quiz&lt;br /&gt;
      post :add_new_questions&lt;br /&gt;
      post :save_all_questions&lt;br /&gt;
      post :create_supplementary_review_questionnaire&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  resources :author_feedback_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :review_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :metareview_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :teammate_review_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :assignment_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :global_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :course_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :bookmarkrating_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :supplementary_review_questionnaire, controller: :questionnaires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Team members'''&lt;br /&gt;
----&lt;br /&gt;
Yanchen Zhao&lt;br /&gt;
&lt;br /&gt;
Pingping Chen&lt;br /&gt;
&lt;br /&gt;
Jianshu Zhang&lt;br /&gt;
&lt;br /&gt;
Zirun Han&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Links'''&lt;br /&gt;
----&lt;br /&gt;
Expertiza on Github:https://github.com/zyczyh/expertiza&lt;br /&gt;
&lt;br /&gt;
Pull Request:https://github.com/expertiza/expertiza/pull/1325&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:https://youtu.be/3PUNknSbU-k&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128370</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128370"/>
		<updated>2019-11-11T01:42:02Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction== &lt;br /&gt;
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 (E1879) 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed solution==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
''Design Strategy''&lt;br /&gt;
&lt;br /&gt;
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). So that we will add a new subclass of Questionnaire named SupplementaryReviewQuestionnaire to achieve our goal.&lt;br /&gt;
 &lt;br /&gt;
First, we want the professor to control if the students can create their own supplementary questions by using a checkbox to indicate. If the professor allow students to create their own questions, there will be a button in the students &amp;quot;Your work&amp;quot; page which can let the students jump to the same page that an instructor lands on when creating a new rubric. Then we will add the questionnaire id of this new SupplementaryReviewQuestionnaire to the Team table when students create their own questionnaire in order to show the corresponding supplementary questions to the reviewers. And when showing review questions to the reviewers we will look up the questionnaire id in Team table and modify the view to add the supplementary questions to review page. Finally, after the reviewers finish the review and submit their responds, we will change the view and let the team member can see the feedback of their supplementary questions.&lt;br /&gt;
&lt;br /&gt;
''Changes in the User Interface''&lt;br /&gt;
&lt;br /&gt;
1. Assignment Page&lt;br /&gt;
&lt;br /&gt;
We add a checkbox for the professor to indicate if student can add their own questions.&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
2. A button called &amp;quot;Create Supplementary Rubric&amp;quot; will appear in the student's &amp;quot;Your Work&amp;quot; section when the Instructor has allowed students to create supplementary review questions. So when a student clicks the button he/she can add the desired questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. The page where student will be directed to when he/she clicks the Create Supplementary Rubric button. Students can add Questions to the created Supplementary Review questionnaire here.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
The students own supplementary questions are leading by a heading &amp;quot;Supplementary Review Questions&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
The supplementary review results will be showed to the team like other results. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''Use Cases'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
1. Use case of creating a Supplementary Review Questionnaire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Use case of reviewing questions for reviewers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Use case of reviewing responses of questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Plan'''&lt;br /&gt;
----&lt;br /&gt;
Actually, we need to add tests for the following:&lt;br /&gt;
&lt;br /&gt;
1. To check the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; appears in the &amp;quot;Your Work&amp;quot; section of a student.&lt;br /&gt;
&lt;br /&gt;
2. To check if the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; redirects to page which allows to create questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. To check if the questionnaire ID is stored in the Team table.&lt;br /&gt;
&lt;br /&gt;
4. To check if the reviewers can see the supplementary questions that were added by the team as part of the review questions.&lt;br /&gt;
&lt;br /&gt;
5. To check if the responses of the Supplementary Review Questions have been added to the responses of the existing review questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''File which are added/modified'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Note: Because the pull request contains some code irrelevant to this project which make it confusing, we post our code here for you to read clearly.&lt;br /&gt;
&lt;br /&gt;
1. Models&lt;br /&gt;
&lt;br /&gt;
app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
Look up the questionnaire ID of a team.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.get_supplementary_review_questionnaire_id_of_team(team_id)&lt;br /&gt;
    team = Team.find(team_id)&lt;br /&gt;
    if team.blank?&lt;br /&gt;
      nil&lt;br /&gt;
    else&lt;br /&gt;
      team.supplementary_review_questionnaire_id&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/supplementary_review_questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
Add the SupplementaryReviewQuestionnaire class which is the subclass of Questionnaire.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # This is one type of Questionnaire and  as intuitively expected this model class&lt;br /&gt;
 # derives from Questionnaire.&lt;br /&gt;
 class SupplementaryReviewQuestionnaire &amp;lt; Questionnaire&lt;br /&gt;
   # Make me better.&lt;br /&gt;
   attr_accessible&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review responses to &amp;quot;Show Review&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def construct_review_response code, self_id, show_tags = nil, current_user = nil&lt;br /&gt;
    code += '&amp;lt;table id=&amp;quot;review_' + self_id + '&amp;quot; style=&amp;quot;display: none;&amp;quot; class=&amp;quot;table table-bordered&amp;quot;&amp;gt;'&lt;br /&gt;
    answers = Answer.where(response_id: self.response_id)&lt;br /&gt;
    team_id = response_map.reviewee_id&lt;br /&gt;
    supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(team_id)&lt;br /&gt;
    unless answers.empty?&lt;br /&gt;
      questionnaire = self.questionnaire_by_answer(answers.first)&lt;br /&gt;
&lt;br /&gt;
      unless supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        supplementary_review_questionnaire = Questionnaire.find(supplementary_review_questionnaire_id)&lt;br /&gt;
        supplementary_review_questions = supplementary_review_questionnaire.questions.sort_by(&amp;amp;:seq)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      questionnaire_max = questionnaire.max_question_score&lt;br /&gt;
      questions = questionnaire.questions.sort_by(&amp;amp;:seq)&lt;br /&gt;
&lt;br /&gt;
      unless supplementary_review_questionnaire.nil?&lt;br /&gt;
        questions += supplementary_review_questions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      # get the tag settings this questionnaire&lt;br /&gt;
      tag_prompt_deployments = show_tags ? TagPromptDeployment.where(questionnaire_id: questionnaire.id, assignment_id: self.map.assignment.id) : nil&lt;br /&gt;
      code = add_table_rows questionnaire_max, questions, answers, code, tag_prompt_deployments, current_user&lt;br /&gt;
    end&lt;br /&gt;
    comment = if !self.additional_comment.nil?&lt;br /&gt;
                self.additional_comment.gsub('^p', '').gsub(/\n/, '&amp;lt;BR/&amp;gt;')&lt;br /&gt;
              else&lt;br /&gt;
                ''&lt;br /&gt;
              end&lt;br /&gt;
    code += '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Additional Comment: &amp;lt;/b&amp;gt;' + comment + '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;br /&gt;
    code += '&amp;lt;/table&amp;gt;'&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Views:&lt;br /&gt;
&lt;br /&gt;
app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add checkbox which professor used to indicate whether students can create their own questions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!--Add a allow studuent-generated questionnaires checkbox. --&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_form[assignment][supplementary_review_questionnaire]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_form[assignment][supplementary_review_questionnaire]', 'true', @assignment_form.assignment.supplementary_review_questionnaire) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_form[assignment][supplementary_review_questionnaire]', 'Allow student-generated questions added to rubric?') %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/response/response.html.erb&lt;br /&gt;
&lt;br /&gt;
Add code to show the supplementary questions to the reviewers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;br&amp;gt;&lt;br /&gt;
       &amp;lt;% unless @supplementary_review_questions.nil? %&amp;gt;&lt;br /&gt;
       &amp;lt;tr&amp;gt;&lt;br /&gt;
         &amp;lt;td&amp;gt;&lt;br /&gt;
           &amp;lt;h2&amp;gt;Supplementary Review Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
       &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;% @supplementary_review_questions.each do |question| %&amp;gt;&lt;br /&gt;
         &amp;lt;tr&amp;gt;&lt;br /&gt;
           &amp;lt;td&amp;gt;&lt;br /&gt;
             &amp;lt;% answer = Answer.where(question_id: question.id, response_id: @response.id).first if !@response.nil? %&amp;gt;&lt;br /&gt;
             &amp;lt;% if question.instance_of? Criterion %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score, @dropdown_or_scale) %&amp;gt;&lt;br /&gt;
               &amp;lt;%= tinymce %&amp;gt;&lt;br /&gt;
             &amp;lt;% elsif question.instance_of? Scale %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score) %&amp;gt;&lt;br /&gt;
               &amp;lt;%= tinymce %&amp;gt;&lt;br /&gt;
             &amp;lt;% elsif question.instance_of? UploadFile %&amp;gt;&lt;br /&gt;
             &amp;lt;% else %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer) %&amp;gt;&lt;br /&gt;
             &amp;lt;% end %&amp;gt;&lt;br /&gt;
           &amp;lt;/td&amp;gt;&lt;br /&gt;
           &amp;lt;td width=&amp;quot;25%&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;% if [Criterion, TextArea].include? question.class %&amp;gt;&lt;br /&gt;
                 &amp;lt;div id=&amp;quot;analysis_&amp;lt;%= i.to_s %&amp;gt;_comments&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
             &amp;lt;% end %&amp;gt;&lt;br /&gt;
           &amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;% i += 1 %&amp;gt;&lt;br /&gt;
         &amp;lt;% end %&amp;gt;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/submitted_content/_main.html.erb&lt;br /&gt;
&lt;br /&gt;
Add button for &amp;quot;your work&amp;quot; page to let students create their own questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if stage != &amp;quot;Finished&amp;quot; and controller.controller_name == 'submitted_content' and @can_submit %&amp;gt;&lt;br /&gt;
  &amp;lt;h2&amp;gt;Add Supplementary Review Questions:&amp;lt;/h2&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.supplementary_review_questionnaire? %&amp;gt;&lt;br /&gt;
      &amp;lt;%= button_to &amp;quot;Create Supplementary Rubric&amp;quot;, {:controller =&amp;gt; &amp;quot;questionnaires&amp;quot;, :action =&amp;gt; &amp;quot;create_supplementary_review_questionnaire&amp;quot;, :id =&amp;gt; participant.id } %&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
      The instructor hasn't enabled this feature for this assignment&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Controllers:&lt;br /&gt;
&lt;br /&gt;
app/controllers/response_controller.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review questionnaires part to the create, edit, update methods and some other methods which getting the questionnaires.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # Prepare the parameters when student clicks &amp;quot;Edit&amp;quot;&lt;br /&gt;
  def edit&lt;br /&gt;
    assign_instance_vars&lt;br /&gt;
    get_all_responses&lt;br /&gt;
    if @prev.present?&lt;br /&gt;
      @sorted = @review_scores.sort {|m1, m2| m1.version_num.to_i &amp;amp;&amp;amp; m2.version_num.to_i ? m2.version_num.to_i &amp;lt;=&amp;gt; m1.version_num.to_i : (m1.version_num ? -1 : 1) }&lt;br /&gt;
      @largest_version_num = @sorted[0]&lt;br /&gt;
    end&lt;br /&gt;
    @modified_object = @response.response_id&lt;br /&gt;
    # set more handy variables for the view&lt;br /&gt;
    set_content&lt;br /&gt;
    @review_scores = []&lt;br /&gt;
    @questions.each do |question|&lt;br /&gt;
      @review_scores &amp;lt;&amp;lt; Answer.where(response_id: @response.response_id, question_id: question.id).first&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @supplementary_review_questions.each do |question|&lt;br /&gt;
      @review_scores &amp;lt;&amp;lt; Answer.where(response_id: @response.response_id, question_id: question.id).first&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @questionnaire = set_questionnaire&lt;br /&gt;
    render action: 'response'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Update the response and answers when student &amp;quot;edit&amp;quot; existing response&lt;br /&gt;
  def update&lt;br /&gt;
    render nothing: true unless action_allowed?&lt;br /&gt;
    # the response to be updated&lt;br /&gt;
    @response = Response.find(params[:id])&lt;br /&gt;
    msg = &amp;quot;&amp;quot;&lt;br /&gt;
    begin&lt;br /&gt;
      @map = @response.map&lt;br /&gt;
      @response.update_attribute('additional_comment', params[:review][:comments])&lt;br /&gt;
&lt;br /&gt;
      set_questionnaire&lt;br /&gt;
      questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
      supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
      unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
        questions += supplementary_review_questions&lt;br /&gt;
      end&lt;br /&gt;
      create_answers(params, questions) unless params[:responses].nil?&lt;br /&gt;
&lt;br /&gt;
      @response.update_attribute('is_submitted', true) if params['isSubmit'] &amp;amp;&amp;amp; params['isSubmit'] == 'Yes'&lt;br /&gt;
      @response.notify_instructor_on_difference if (@map.is_a? ReviewResponseMap) &amp;amp;&amp;amp; @response.is_submitted &amp;amp;&amp;amp; @response.significant_difference?&lt;br /&gt;
    rescue StandardError&lt;br /&gt;
      msg = &amp;quot;Your response was not saved. Cause:189 #{$ERROR_INFO}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Your response was submitted: #{@response.is_submitted}&amp;quot;, request)&lt;br /&gt;
    redirect_to controller: 'response', action: 'save', id: @map.map_id,&lt;br /&gt;
                return: params[:return], msg: msg, review: params[:review], save_options: params[:save_options]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
 def create&lt;br /&gt;
    map_id = params[:id]&lt;br /&gt;
    map_id = params[:map_id] unless params[:map_id].nil? # pass map_id as a hidden field in the review form&lt;br /&gt;
    @map = ResponseMap.find(map_id)&lt;br /&gt;
    @team_id = @map.reviewee_id&lt;br /&gt;
&lt;br /&gt;
    get_all_responses&lt;br /&gt;
    if params[:review][:questionnaire_id]&lt;br /&gt;
      @questionnaire = Questionnaire.find(params[:review][:questionnaire_id])&lt;br /&gt;
      @round = params[:review][:round]&lt;br /&gt;
      @supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@team_id)&lt;br /&gt;
      unless @supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        @supplementary_review_questionnaire = Questionnaire.find(@supplementary_review_questionnaire_id)&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      @round = nil&lt;br /&gt;
    end&lt;br /&gt;
    is_submitted = (params[:isSubmit] == 'Yes')&lt;br /&gt;
    was_submitted = false&lt;br /&gt;
    @response = Response.where(map_id: @map.id, round: @round.to_i).first&lt;br /&gt;
    if @response.nil?&lt;br /&gt;
      @response = Response.create(&lt;br /&gt;
        map_id: @map.id,&lt;br /&gt;
        additional_comment: params[:review][:comments],&lt;br /&gt;
        round: @round.to_i,&lt;br /&gt;
        is_submitted: is_submitted&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
    was_submitted = @response.is_submitted&lt;br /&gt;
    @response.update(additional_comment: params[:review][:comments], is_submitted: is_submitted) # ignore if autoupdate try to save when the response object is not yet created.&lt;br /&gt;
&lt;br /&gt;
    # ,:version_num=&amp;gt;@version)&lt;br /&gt;
    # Change the order for displaying questions for editing response views.&lt;br /&gt;
    questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
&lt;br /&gt;
    unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
      supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
      questions += supplementary_review_questions&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    create_answers(params, questions) if params[:responses]&lt;br /&gt;
    msg = &amp;quot;Your response was successfully saved.&amp;quot;&lt;br /&gt;
    error_msg = &amp;quot;&amp;quot;&lt;br /&gt;
    # only notify if is_submitted changes from false to true&lt;br /&gt;
    if (@map.is_a? ReviewResponseMap) &amp;amp;&amp;amp; (was_submitted == false &amp;amp;&amp;amp; @response.is_submitted) &amp;amp;&amp;amp; @response.significant_difference?&lt;br /&gt;
      @response.notify_instructor_on_difference&lt;br /&gt;
      @response.email&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'response', action: 'save', id: @map.map_id,&lt;br /&gt;
                return: params[:return], msg: msg, error_msg: error_msg, review: params[:review], save_options: params[:save_options]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  # new_response if a flag parameter indicating that if user is requesting a new rubric to fill&lt;br /&gt;
  # if true: we figure out which questionnaire to use based on current time and records in assignment_questionnaires table&lt;br /&gt;
  # e.g. student click &amp;quot;Begin&amp;quot; or &amp;quot;Update&amp;quot; to start filling out a rubric for others' work&lt;br /&gt;
  # if false: we figure out which questionnaire to display base on @response object&lt;br /&gt;
  # e.g. student click &amp;quot;Edit&amp;quot; or &amp;quot;View&amp;quot;&lt;br /&gt;
  def set_content(new_response = false)&lt;br /&gt;
    @title = @map.get_title&lt;br /&gt;
    if @map.survey?&lt;br /&gt;
      @survey_parent = @map.survey_parent&lt;br /&gt;
    else&lt;br /&gt;
      @assignment = @map.assignment&lt;br /&gt;
    end&lt;br /&gt;
    @participant = @map.reviewer&lt;br /&gt;
    @contributor = @map.contributor&lt;br /&gt;
    new_response ? set_questionnaire_for_new_response : set_questionnaire&lt;br /&gt;
    set_dropdown_or_scale&lt;br /&gt;
    @questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
&lt;br /&gt;
    unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
      @supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @min = @questionnaire.min_question_score&lt;br /&gt;
    @max = @questionnaire.max_question_score&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_questionnaire_for_new_response&lt;br /&gt;
    case @map.type&lt;br /&gt;
    when &amp;quot;ReviewResponseMap&amp;quot;, &amp;quot;SelfReviewResponseMap&amp;quot;&lt;br /&gt;
      reviewees_topic = SignedUpTeam.topic_id_by_team_id(@contributor.id)&lt;br /&gt;
      @current_round = @assignment.number_of_current_round(reviewees_topic)&lt;br /&gt;
      @questionnaire = @map.questionnaire(@current_round)&lt;br /&gt;
&lt;br /&gt;
      @supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@contributor.id)&lt;br /&gt;
      unless @supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        @supplementary_review_questionnaire = Questionnaire.find(@supplementary_review_questionnaire_id)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
    when&lt;br /&gt;
      &amp;quot;MetareviewResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;TeammateReviewResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;FeedbackResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;CourseSurveyResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;AssignmentSurveyResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;GlobalSurveyResponseMap&amp;quot;&lt;br /&gt;
      @questionnaire = @map.questionnaire&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_questionnaire&lt;br /&gt;
    # if user is not filling a new rubric, the @response object should be available.&lt;br /&gt;
    # we can find the questionnaire from the question_id in answers&lt;br /&gt;
    answer = @response.scores.first&lt;br /&gt;
    @questionnaire = @response.questionnaire_by_answer(answer)&lt;br /&gt;
&lt;br /&gt;
    supplementary_review_answer = @response.scores.last&lt;br /&gt;
    @supplementary_review_questionnaire = @response.questionnaire_by_answer(supplementary_review_answer)&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review responses to &amp;quot;Your Scores&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def view_team&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @team = @participant.team&lt;br /&gt;
    @team_id = @team.id&lt;br /&gt;
    @questions = {}&lt;br /&gt;
    questionnaires = @assignment.questionnaires&lt;br /&gt;
    retrieve_questions questionnaires&lt;br /&gt;
    @pscore = @participant.scores(@questions)&lt;br /&gt;
    @vmlist = []&lt;br /&gt;
&lt;br /&gt;
    # loop through each questionnaire, and populate the view model for all data necessary&lt;br /&gt;
    # to render the html tables.&lt;br /&gt;
    counter_for_same_rubric = 0&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      @round = nil&lt;br /&gt;
      if @assignment.varying_rubrics_by_round? &amp;amp;&amp;amp; questionnaire.type == &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
        questionnaires = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id)&lt;br /&gt;
        if questionnaires.count &amp;gt; 1&lt;br /&gt;
          @round = questionnaires[counter_for_same_rubric].used_in_round&lt;br /&gt;
          counter_for_same_rubric += 1&lt;br /&gt;
        else&lt;br /&gt;
          @round = questionnaires[0].used_in_round&lt;br /&gt;
          counter_for_same_rubric = 0&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      vm = VmQuestionResponse.new(questionnaire, @assignment, @round)&lt;br /&gt;
      supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@team_id)&lt;br /&gt;
      unless supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        supplementary_review_questionnaire = Questionnaire.find(supplementary_review_questionnaire_id)&lt;br /&gt;
        unless supplementary_review_questionnaire.nil?&lt;br /&gt;
          supplementary_review_questions = supplementary_review_questionnaire.questions&lt;br /&gt;
          questionnaire.questions += supplementary_review_questions&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      vmquestions = questionnaire.questions&lt;br /&gt;
      vm.add_questions(vmquestions)&lt;br /&gt;
      vm.add_team_members(@team)&lt;br /&gt;
      vm.add_reviews(@participant, @team, @assignment.varying_rubrics_by_round?)&lt;br /&gt;
      vm.get_number_of_comments_greater_than_10_words&lt;br /&gt;
      @vmlist &amp;lt;&amp;lt; vm&lt;br /&gt;
    end&lt;br /&gt;
    @current_role_name = current_role_name&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
Method for creating Supplementary Review Questionnaire.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   def create_supplementary_review_questionnaire&lt;br /&gt;
     @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
     @team = Team.find(@participant.team.id)&lt;br /&gt;
     if @team.supplementary_review_questionnaire_id.nil?&lt;br /&gt;
       @questionnaire = Questionnaire.create(privete: false, name: &amp;quot;supplementary_review_questionnaire_&amp;quot; + @team.id.to_s,&lt;br /&gt;
         instructor_id: @team_id, min_question_score: 0, max_question_score: 5, type: &amp;quot;Questionnaire&amp;quot;, display_type: &amp;quot;Review&amp;quot;&lt;br /&gt;
         instruction_loc: Questionnaire::DEFAULT_QUESTIONNAIRE_URL)&lt;br /&gt;
       if @questionnaire.save&lt;br /&gt;
         @team.supplementary_review_questionnaire_id = @questionnaire.id&lt;br /&gt;
         @team.save&lt;br /&gt;
         flash[:success] = 'You have successfully created a rubric!'&lt;br /&gt;
       else&lt;br /&gt;
         flash[:error] = $ERROR_INFO&lt;br /&gt;
       end&lt;br /&gt;
     else&lt;br /&gt;
       @questionnaire = Questionnaire.find(@team.supplementary_review_questionnaire_id)&lt;br /&gt;
     end&lt;br /&gt;
     redirect_to controller: 'questionnaires', action: 'edit', id: @questionnaire.id&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Config:&lt;br /&gt;
&lt;br /&gt;
routes.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  resources :questionnaires, only: %i[new create edit update] do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :copy&lt;br /&gt;
      get :list&lt;br /&gt;
      post :list_questionnaires&lt;br /&gt;
      get :new_quiz&lt;br /&gt;
      get :select_questionnaire_type&lt;br /&gt;
      post :select_questionnaire_type&lt;br /&gt;
      get :toggle_access&lt;br /&gt;
      get :view&lt;br /&gt;
      post :create_quiz_questionnaire&lt;br /&gt;
      post :update_quiz&lt;br /&gt;
      post :add_new_questions&lt;br /&gt;
      post :save_all_questions&lt;br /&gt;
      post :create_supplementary_review_questionnaire&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  resources :author_feedback_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :review_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :metareview_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :teammate_review_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :assignment_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :global_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :course_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :bookmarkrating_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :supplementary_review_questionnaire, controller: :questionnaires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Team members'''&lt;br /&gt;
----&lt;br /&gt;
Yanchen Zhao&lt;br /&gt;
&lt;br /&gt;
Pingping Chen&lt;br /&gt;
&lt;br /&gt;
Jianshu Zhang&lt;br /&gt;
&lt;br /&gt;
Zirun Han&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Links'''&lt;br /&gt;
----&lt;br /&gt;
Expertiza on Github:https://github.com/zyczyh/expertiza&lt;br /&gt;
&lt;br /&gt;
Pull Request:https://github.com/expertiza/expertiza/pull/1325&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:https://youtu.be/3PUNknSbU-k&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128368</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128368"/>
		<updated>2019-11-11T01:41:26Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction== &lt;br /&gt;
----&lt;br /&gt;
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 (E1879) 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Proposed solution'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
''Design Strategy''&lt;br /&gt;
&lt;br /&gt;
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). So that we will add a new subclass of Questionnaire named SupplementaryReviewQuestionnaire to achieve our goal.&lt;br /&gt;
 &lt;br /&gt;
First, we want the professor to control if the students can create their own supplementary questions by using a checkbox to indicate. If the professor allow students to create their own questions, there will be a button in the students &amp;quot;Your work&amp;quot; page which can let the students jump to the same page that an instructor lands on when creating a new rubric. Then we will add the questionnaire id of this new SupplementaryReviewQuestionnaire to the Team table when students create their own questionnaire in order to show the corresponding supplementary questions to the reviewers. And when showing review questions to the reviewers we will look up the questionnaire id in Team table and modify the view to add the supplementary questions to review page. Finally, after the reviewers finish the review and submit their responds, we will change the view and let the team member can see the feedback of their supplementary questions.&lt;br /&gt;
&lt;br /&gt;
''Changes in the User Interface''&lt;br /&gt;
&lt;br /&gt;
1. Assignment Page&lt;br /&gt;
&lt;br /&gt;
We add a checkbox for the professor to indicate if student can add their own questions.&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
2. A button called &amp;quot;Create Supplementary Rubric&amp;quot; will appear in the student's &amp;quot;Your Work&amp;quot; section when the Instructor has allowed students to create supplementary review questions. So when a student clicks the button he/she can add the desired questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. The page where student will be directed to when he/she clicks the Create Supplementary Rubric button. Students can add Questions to the created Supplementary Review questionnaire here.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
The students own supplementary questions are leading by a heading &amp;quot;Supplementary Review Questions&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
The supplementary review results will be showed to the team like other results. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''Use Cases'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
1. Use case of creating a Supplementary Review Questionnaire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Use case of reviewing questions for reviewers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Use case of reviewing responses of questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Plan'''&lt;br /&gt;
----&lt;br /&gt;
Actually, we need to add tests for the following:&lt;br /&gt;
&lt;br /&gt;
1. To check the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; appears in the &amp;quot;Your Work&amp;quot; section of a student.&lt;br /&gt;
&lt;br /&gt;
2. To check if the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; redirects to page which allows to create questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. To check if the questionnaire ID is stored in the Team table.&lt;br /&gt;
&lt;br /&gt;
4. To check if the reviewers can see the supplementary questions that were added by the team as part of the review questions.&lt;br /&gt;
&lt;br /&gt;
5. To check if the responses of the Supplementary Review Questions have been added to the responses of the existing review questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''File which are added/modified'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Note: Because the pull request contains some code irrelevant to this project which make it confusing, we post our code here for you to read clearly.&lt;br /&gt;
&lt;br /&gt;
1. Models&lt;br /&gt;
&lt;br /&gt;
app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
Look up the questionnaire ID of a team.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.get_supplementary_review_questionnaire_id_of_team(team_id)&lt;br /&gt;
    team = Team.find(team_id)&lt;br /&gt;
    if team.blank?&lt;br /&gt;
      nil&lt;br /&gt;
    else&lt;br /&gt;
      team.supplementary_review_questionnaire_id&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/supplementary_review_questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
Add the SupplementaryReviewQuestionnaire class which is the subclass of Questionnaire.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # This is one type of Questionnaire and  as intuitively expected this model class&lt;br /&gt;
 # derives from Questionnaire.&lt;br /&gt;
 class SupplementaryReviewQuestionnaire &amp;lt; Questionnaire&lt;br /&gt;
   # Make me better.&lt;br /&gt;
   attr_accessible&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review responses to &amp;quot;Show Review&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def construct_review_response code, self_id, show_tags = nil, current_user = nil&lt;br /&gt;
    code += '&amp;lt;table id=&amp;quot;review_' + self_id + '&amp;quot; style=&amp;quot;display: none;&amp;quot; class=&amp;quot;table table-bordered&amp;quot;&amp;gt;'&lt;br /&gt;
    answers = Answer.where(response_id: self.response_id)&lt;br /&gt;
    team_id = response_map.reviewee_id&lt;br /&gt;
    supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(team_id)&lt;br /&gt;
    unless answers.empty?&lt;br /&gt;
      questionnaire = self.questionnaire_by_answer(answers.first)&lt;br /&gt;
&lt;br /&gt;
      unless supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        supplementary_review_questionnaire = Questionnaire.find(supplementary_review_questionnaire_id)&lt;br /&gt;
        supplementary_review_questions = supplementary_review_questionnaire.questions.sort_by(&amp;amp;:seq)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      questionnaire_max = questionnaire.max_question_score&lt;br /&gt;
      questions = questionnaire.questions.sort_by(&amp;amp;:seq)&lt;br /&gt;
&lt;br /&gt;
      unless supplementary_review_questionnaire.nil?&lt;br /&gt;
        questions += supplementary_review_questions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      # get the tag settings this questionnaire&lt;br /&gt;
      tag_prompt_deployments = show_tags ? TagPromptDeployment.where(questionnaire_id: questionnaire.id, assignment_id: self.map.assignment.id) : nil&lt;br /&gt;
      code = add_table_rows questionnaire_max, questions, answers, code, tag_prompt_deployments, current_user&lt;br /&gt;
    end&lt;br /&gt;
    comment = if !self.additional_comment.nil?&lt;br /&gt;
                self.additional_comment.gsub('^p', '').gsub(/\n/, '&amp;lt;BR/&amp;gt;')&lt;br /&gt;
              else&lt;br /&gt;
                ''&lt;br /&gt;
              end&lt;br /&gt;
    code += '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Additional Comment: &amp;lt;/b&amp;gt;' + comment + '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;br /&gt;
    code += '&amp;lt;/table&amp;gt;'&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Views:&lt;br /&gt;
&lt;br /&gt;
app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add checkbox which professor used to indicate whether students can create their own questions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!--Add a allow studuent-generated questionnaires checkbox. --&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_form[assignment][supplementary_review_questionnaire]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_form[assignment][supplementary_review_questionnaire]', 'true', @assignment_form.assignment.supplementary_review_questionnaire) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_form[assignment][supplementary_review_questionnaire]', 'Allow student-generated questions added to rubric?') %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/response/response.html.erb&lt;br /&gt;
&lt;br /&gt;
Add code to show the supplementary questions to the reviewers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;br&amp;gt;&lt;br /&gt;
       &amp;lt;% unless @supplementary_review_questions.nil? %&amp;gt;&lt;br /&gt;
       &amp;lt;tr&amp;gt;&lt;br /&gt;
         &amp;lt;td&amp;gt;&lt;br /&gt;
           &amp;lt;h2&amp;gt;Supplementary Review Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
       &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;% @supplementary_review_questions.each do |question| %&amp;gt;&lt;br /&gt;
         &amp;lt;tr&amp;gt;&lt;br /&gt;
           &amp;lt;td&amp;gt;&lt;br /&gt;
             &amp;lt;% answer = Answer.where(question_id: question.id, response_id: @response.id).first if !@response.nil? %&amp;gt;&lt;br /&gt;
             &amp;lt;% if question.instance_of? Criterion %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score, @dropdown_or_scale) %&amp;gt;&lt;br /&gt;
               &amp;lt;%= tinymce %&amp;gt;&lt;br /&gt;
             &amp;lt;% elsif question.instance_of? Scale %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score) %&amp;gt;&lt;br /&gt;
               &amp;lt;%= tinymce %&amp;gt;&lt;br /&gt;
             &amp;lt;% elsif question.instance_of? UploadFile %&amp;gt;&lt;br /&gt;
             &amp;lt;% else %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer) %&amp;gt;&lt;br /&gt;
             &amp;lt;% end %&amp;gt;&lt;br /&gt;
           &amp;lt;/td&amp;gt;&lt;br /&gt;
           &amp;lt;td width=&amp;quot;25%&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;% if [Criterion, TextArea].include? question.class %&amp;gt;&lt;br /&gt;
                 &amp;lt;div id=&amp;quot;analysis_&amp;lt;%= i.to_s %&amp;gt;_comments&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
             &amp;lt;% end %&amp;gt;&lt;br /&gt;
           &amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;% i += 1 %&amp;gt;&lt;br /&gt;
         &amp;lt;% end %&amp;gt;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/submitted_content/_main.html.erb&lt;br /&gt;
&lt;br /&gt;
Add button for &amp;quot;your work&amp;quot; page to let students create their own questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if stage != &amp;quot;Finished&amp;quot; and controller.controller_name == 'submitted_content' and @can_submit %&amp;gt;&lt;br /&gt;
  &amp;lt;h2&amp;gt;Add Supplementary Review Questions:&amp;lt;/h2&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.supplementary_review_questionnaire? %&amp;gt;&lt;br /&gt;
      &amp;lt;%= button_to &amp;quot;Create Supplementary Rubric&amp;quot;, {:controller =&amp;gt; &amp;quot;questionnaires&amp;quot;, :action =&amp;gt; &amp;quot;create_supplementary_review_questionnaire&amp;quot;, :id =&amp;gt; participant.id } %&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
      The instructor hasn't enabled this feature for this assignment&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Controllers:&lt;br /&gt;
&lt;br /&gt;
app/controllers/response_controller.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review questionnaires part to the create, edit, update methods and some other methods which getting the questionnaires.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # Prepare the parameters when student clicks &amp;quot;Edit&amp;quot;&lt;br /&gt;
  def edit&lt;br /&gt;
    assign_instance_vars&lt;br /&gt;
    get_all_responses&lt;br /&gt;
    if @prev.present?&lt;br /&gt;
      @sorted = @review_scores.sort {|m1, m2| m1.version_num.to_i &amp;amp;&amp;amp; m2.version_num.to_i ? m2.version_num.to_i &amp;lt;=&amp;gt; m1.version_num.to_i : (m1.version_num ? -1 : 1) }&lt;br /&gt;
      @largest_version_num = @sorted[0]&lt;br /&gt;
    end&lt;br /&gt;
    @modified_object = @response.response_id&lt;br /&gt;
    # set more handy variables for the view&lt;br /&gt;
    set_content&lt;br /&gt;
    @review_scores = []&lt;br /&gt;
    @questions.each do |question|&lt;br /&gt;
      @review_scores &amp;lt;&amp;lt; Answer.where(response_id: @response.response_id, question_id: question.id).first&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @supplementary_review_questions.each do |question|&lt;br /&gt;
      @review_scores &amp;lt;&amp;lt; Answer.where(response_id: @response.response_id, question_id: question.id).first&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @questionnaire = set_questionnaire&lt;br /&gt;
    render action: 'response'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Update the response and answers when student &amp;quot;edit&amp;quot; existing response&lt;br /&gt;
  def update&lt;br /&gt;
    render nothing: true unless action_allowed?&lt;br /&gt;
    # the response to be updated&lt;br /&gt;
    @response = Response.find(params[:id])&lt;br /&gt;
    msg = &amp;quot;&amp;quot;&lt;br /&gt;
    begin&lt;br /&gt;
      @map = @response.map&lt;br /&gt;
      @response.update_attribute('additional_comment', params[:review][:comments])&lt;br /&gt;
&lt;br /&gt;
      set_questionnaire&lt;br /&gt;
      questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
      supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
      unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
        questions += supplementary_review_questions&lt;br /&gt;
      end&lt;br /&gt;
      create_answers(params, questions) unless params[:responses].nil?&lt;br /&gt;
&lt;br /&gt;
      @response.update_attribute('is_submitted', true) if params['isSubmit'] &amp;amp;&amp;amp; params['isSubmit'] == 'Yes'&lt;br /&gt;
      @response.notify_instructor_on_difference if (@map.is_a? ReviewResponseMap) &amp;amp;&amp;amp; @response.is_submitted &amp;amp;&amp;amp; @response.significant_difference?&lt;br /&gt;
    rescue StandardError&lt;br /&gt;
      msg = &amp;quot;Your response was not saved. Cause:189 #{$ERROR_INFO}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Your response was submitted: #{@response.is_submitted}&amp;quot;, request)&lt;br /&gt;
    redirect_to controller: 'response', action: 'save', id: @map.map_id,&lt;br /&gt;
                return: params[:return], msg: msg, review: params[:review], save_options: params[:save_options]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
 def create&lt;br /&gt;
    map_id = params[:id]&lt;br /&gt;
    map_id = params[:map_id] unless params[:map_id].nil? # pass map_id as a hidden field in the review form&lt;br /&gt;
    @map = ResponseMap.find(map_id)&lt;br /&gt;
    @team_id = @map.reviewee_id&lt;br /&gt;
&lt;br /&gt;
    get_all_responses&lt;br /&gt;
    if params[:review][:questionnaire_id]&lt;br /&gt;
      @questionnaire = Questionnaire.find(params[:review][:questionnaire_id])&lt;br /&gt;
      @round = params[:review][:round]&lt;br /&gt;
      @supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@team_id)&lt;br /&gt;
      unless @supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        @supplementary_review_questionnaire = Questionnaire.find(@supplementary_review_questionnaire_id)&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      @round = nil&lt;br /&gt;
    end&lt;br /&gt;
    is_submitted = (params[:isSubmit] == 'Yes')&lt;br /&gt;
    was_submitted = false&lt;br /&gt;
    @response = Response.where(map_id: @map.id, round: @round.to_i).first&lt;br /&gt;
    if @response.nil?&lt;br /&gt;
      @response = Response.create(&lt;br /&gt;
        map_id: @map.id,&lt;br /&gt;
        additional_comment: params[:review][:comments],&lt;br /&gt;
        round: @round.to_i,&lt;br /&gt;
        is_submitted: is_submitted&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
    was_submitted = @response.is_submitted&lt;br /&gt;
    @response.update(additional_comment: params[:review][:comments], is_submitted: is_submitted) # ignore if autoupdate try to save when the response object is not yet created.&lt;br /&gt;
&lt;br /&gt;
    # ,:version_num=&amp;gt;@version)&lt;br /&gt;
    # Change the order for displaying questions for editing response views.&lt;br /&gt;
    questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
&lt;br /&gt;
    unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
      supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
      questions += supplementary_review_questions&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    create_answers(params, questions) if params[:responses]&lt;br /&gt;
    msg = &amp;quot;Your response was successfully saved.&amp;quot;&lt;br /&gt;
    error_msg = &amp;quot;&amp;quot;&lt;br /&gt;
    # only notify if is_submitted changes from false to true&lt;br /&gt;
    if (@map.is_a? ReviewResponseMap) &amp;amp;&amp;amp; (was_submitted == false &amp;amp;&amp;amp; @response.is_submitted) &amp;amp;&amp;amp; @response.significant_difference?&lt;br /&gt;
      @response.notify_instructor_on_difference&lt;br /&gt;
      @response.email&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'response', action: 'save', id: @map.map_id,&lt;br /&gt;
                return: params[:return], msg: msg, error_msg: error_msg, review: params[:review], save_options: params[:save_options]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  # new_response if a flag parameter indicating that if user is requesting a new rubric to fill&lt;br /&gt;
  # if true: we figure out which questionnaire to use based on current time and records in assignment_questionnaires table&lt;br /&gt;
  # e.g. student click &amp;quot;Begin&amp;quot; or &amp;quot;Update&amp;quot; to start filling out a rubric for others' work&lt;br /&gt;
  # if false: we figure out which questionnaire to display base on @response object&lt;br /&gt;
  # e.g. student click &amp;quot;Edit&amp;quot; or &amp;quot;View&amp;quot;&lt;br /&gt;
  def set_content(new_response = false)&lt;br /&gt;
    @title = @map.get_title&lt;br /&gt;
    if @map.survey?&lt;br /&gt;
      @survey_parent = @map.survey_parent&lt;br /&gt;
    else&lt;br /&gt;
      @assignment = @map.assignment&lt;br /&gt;
    end&lt;br /&gt;
    @participant = @map.reviewer&lt;br /&gt;
    @contributor = @map.contributor&lt;br /&gt;
    new_response ? set_questionnaire_for_new_response : set_questionnaire&lt;br /&gt;
    set_dropdown_or_scale&lt;br /&gt;
    @questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
&lt;br /&gt;
    unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
      @supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @min = @questionnaire.min_question_score&lt;br /&gt;
    @max = @questionnaire.max_question_score&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_questionnaire_for_new_response&lt;br /&gt;
    case @map.type&lt;br /&gt;
    when &amp;quot;ReviewResponseMap&amp;quot;, &amp;quot;SelfReviewResponseMap&amp;quot;&lt;br /&gt;
      reviewees_topic = SignedUpTeam.topic_id_by_team_id(@contributor.id)&lt;br /&gt;
      @current_round = @assignment.number_of_current_round(reviewees_topic)&lt;br /&gt;
      @questionnaire = @map.questionnaire(@current_round)&lt;br /&gt;
&lt;br /&gt;
      @supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@contributor.id)&lt;br /&gt;
      unless @supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        @supplementary_review_questionnaire = Questionnaire.find(@supplementary_review_questionnaire_id)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
    when&lt;br /&gt;
      &amp;quot;MetareviewResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;TeammateReviewResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;FeedbackResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;CourseSurveyResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;AssignmentSurveyResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;GlobalSurveyResponseMap&amp;quot;&lt;br /&gt;
      @questionnaire = @map.questionnaire&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_questionnaire&lt;br /&gt;
    # if user is not filling a new rubric, the @response object should be available.&lt;br /&gt;
    # we can find the questionnaire from the question_id in answers&lt;br /&gt;
    answer = @response.scores.first&lt;br /&gt;
    @questionnaire = @response.questionnaire_by_answer(answer)&lt;br /&gt;
&lt;br /&gt;
    supplementary_review_answer = @response.scores.last&lt;br /&gt;
    @supplementary_review_questionnaire = @response.questionnaire_by_answer(supplementary_review_answer)&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review responses to &amp;quot;Your Scores&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def view_team&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @team = @participant.team&lt;br /&gt;
    @team_id = @team.id&lt;br /&gt;
    @questions = {}&lt;br /&gt;
    questionnaires = @assignment.questionnaires&lt;br /&gt;
    retrieve_questions questionnaires&lt;br /&gt;
    @pscore = @participant.scores(@questions)&lt;br /&gt;
    @vmlist = []&lt;br /&gt;
&lt;br /&gt;
    # loop through each questionnaire, and populate the view model for all data necessary&lt;br /&gt;
    # to render the html tables.&lt;br /&gt;
    counter_for_same_rubric = 0&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      @round = nil&lt;br /&gt;
      if @assignment.varying_rubrics_by_round? &amp;amp;&amp;amp; questionnaire.type == &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
        questionnaires = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id)&lt;br /&gt;
        if questionnaires.count &amp;gt; 1&lt;br /&gt;
          @round = questionnaires[counter_for_same_rubric].used_in_round&lt;br /&gt;
          counter_for_same_rubric += 1&lt;br /&gt;
        else&lt;br /&gt;
          @round = questionnaires[0].used_in_round&lt;br /&gt;
          counter_for_same_rubric = 0&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      vm = VmQuestionResponse.new(questionnaire, @assignment, @round)&lt;br /&gt;
      supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@team_id)&lt;br /&gt;
      unless supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        supplementary_review_questionnaire = Questionnaire.find(supplementary_review_questionnaire_id)&lt;br /&gt;
        unless supplementary_review_questionnaire.nil?&lt;br /&gt;
          supplementary_review_questions = supplementary_review_questionnaire.questions&lt;br /&gt;
          questionnaire.questions += supplementary_review_questions&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      vmquestions = questionnaire.questions&lt;br /&gt;
      vm.add_questions(vmquestions)&lt;br /&gt;
      vm.add_team_members(@team)&lt;br /&gt;
      vm.add_reviews(@participant, @team, @assignment.varying_rubrics_by_round?)&lt;br /&gt;
      vm.get_number_of_comments_greater_than_10_words&lt;br /&gt;
      @vmlist &amp;lt;&amp;lt; vm&lt;br /&gt;
    end&lt;br /&gt;
    @current_role_name = current_role_name&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
Method for creating Supplementary Review Questionnaire.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   def create_supplementary_review_questionnaire&lt;br /&gt;
     @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
     @team = Team.find(@participant.team.id)&lt;br /&gt;
     if @team.supplementary_review_questionnaire_id.nil?&lt;br /&gt;
       @questionnaire = Questionnaire.create(privete: false, name: &amp;quot;supplementary_review_questionnaire_&amp;quot; + @team.id.to_s,&lt;br /&gt;
         instructor_id: @team_id, min_question_score: 0, max_question_score: 5, type: &amp;quot;Questionnaire&amp;quot;, display_type: &amp;quot;Review&amp;quot;&lt;br /&gt;
         instruction_loc: Questionnaire::DEFAULT_QUESTIONNAIRE_URL)&lt;br /&gt;
       if @questionnaire.save&lt;br /&gt;
         @team.supplementary_review_questionnaire_id = @questionnaire.id&lt;br /&gt;
         @team.save&lt;br /&gt;
         flash[:success] = 'You have successfully created a rubric!'&lt;br /&gt;
       else&lt;br /&gt;
         flash[:error] = $ERROR_INFO&lt;br /&gt;
       end&lt;br /&gt;
     else&lt;br /&gt;
       @questionnaire = Questionnaire.find(@team.supplementary_review_questionnaire_id)&lt;br /&gt;
     end&lt;br /&gt;
     redirect_to controller: 'questionnaires', action: 'edit', id: @questionnaire.id&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Config:&lt;br /&gt;
&lt;br /&gt;
routes.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  resources :questionnaires, only: %i[new create edit update] do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :copy&lt;br /&gt;
      get :list&lt;br /&gt;
      post :list_questionnaires&lt;br /&gt;
      get :new_quiz&lt;br /&gt;
      get :select_questionnaire_type&lt;br /&gt;
      post :select_questionnaire_type&lt;br /&gt;
      get :toggle_access&lt;br /&gt;
      get :view&lt;br /&gt;
      post :create_quiz_questionnaire&lt;br /&gt;
      post :update_quiz&lt;br /&gt;
      post :add_new_questions&lt;br /&gt;
      post :save_all_questions&lt;br /&gt;
      post :create_supplementary_review_questionnaire&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  resources :author_feedback_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :review_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :metareview_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :teammate_review_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :assignment_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :global_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :course_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :bookmarkrating_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :supplementary_review_questionnaire, controller: :questionnaires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Team members'''&lt;br /&gt;
----&lt;br /&gt;
Yanchen Zhao&lt;br /&gt;
&lt;br /&gt;
Pingping Chen&lt;br /&gt;
&lt;br /&gt;
Jianshu Zhang&lt;br /&gt;
&lt;br /&gt;
Zirun Han&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Links'''&lt;br /&gt;
----&lt;br /&gt;
Expertiza on Github:https://github.com/zyczyh/expertiza&lt;br /&gt;
&lt;br /&gt;
Pull Request:https://github.com/expertiza/expertiza/pull/1325&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:https://youtu.be/3PUNknSbU-k&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128313</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128313"/>
		<updated>2019-11-11T00:11:52Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Introduction'''&lt;br /&gt;
----&lt;br /&gt;
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 (E1879) 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Proposed solution'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
''Design Strategy''&lt;br /&gt;
&lt;br /&gt;
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). So that we will add a new subclass of Questionnaire named SupplementaryReviewQuestionnaire to achieve our goal.&lt;br /&gt;
 &lt;br /&gt;
First, we want the professor to control if the students can create their own supplementary questions by using a checkbox to indicate. If the professor allow students to create their own questions, there will be a button in the students &amp;quot;Your work&amp;quot; page which can let the students jump to the same page that an instructor lands on when creating a new rubric. Then we will add the questionnaire id of this new SupplementaryReviewQuestionnaire to the Team table when students create their own questionnaire in order to show the corresponding supplementary questions to the reviewers. And when showing review questions to the reviewers we will look up the questionnaire id in Team table and modify the view to add the supplementary questions to review page. Finally, after the reviewers finish the review and submit their responds, we will change the view and let the team member can see the feedback of their supplementary questions.&lt;br /&gt;
&lt;br /&gt;
''Changes in the User Interface''&lt;br /&gt;
&lt;br /&gt;
1. Assignment Page&lt;br /&gt;
&lt;br /&gt;
We add a checkbox for the professor to indicate if student can add their own questions.&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
2. A button called &amp;quot;Create Supplementary Rubric&amp;quot; will appear in the student's &amp;quot;Your Work&amp;quot; section when the Instructor has allowed students to create supplementary review questions. So when a student clicks the button he/she can add the desired questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. The page where student will be directed to when he/she clicks the Create Supplementary Rubric button. Students can add Questions to the created Supplementary Review questionnaire here.&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
The students own supplementary questions are leading by a heading &amp;quot;Supplementary Review Questions&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
The supplementary review results will be showed to the team like other results. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''Use Cases'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
1. Use case of creating a Supplementary Review Questionnaire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Use case of reviewing questions for reviewers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Use case of reviewing responses of questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Plan'''&lt;br /&gt;
----&lt;br /&gt;
Actually, we need to add tests for the following:&lt;br /&gt;
&lt;br /&gt;
1. To check the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; appears in the &amp;quot;Your Work&amp;quot; section of a student.&lt;br /&gt;
&lt;br /&gt;
2. To check if the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; redirects to page which allows to create questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. To check if the questionnaire ID is stored in the Team table.&lt;br /&gt;
&lt;br /&gt;
4. To check if the reviewers can see the supplementary questions that were added by the team as part of the review questions.&lt;br /&gt;
&lt;br /&gt;
5. To check if the responses of the Supplementary Review Questions have been added to the responses of the existing review questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''File which are added/modified'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Note: Because the pull request contains some code irrelevant to this project which make it confusing, we post our code here for you to read clearly.&lt;br /&gt;
&lt;br /&gt;
1. Models&lt;br /&gt;
&lt;br /&gt;
app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
Look up the questionnaire ID of a team.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.get_supplementary_review_questionnaire_id_of_team(team_id)&lt;br /&gt;
    team = Team.find(team_id)&lt;br /&gt;
    if team.blank?&lt;br /&gt;
      nil&lt;br /&gt;
    else&lt;br /&gt;
      team.supplementary_review_questionnaire_id&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/supplementary_review_questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
Add the SupplementaryReviewQuestionnaire class which is the subclass of Questionnaire.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # This is one type of Questionnaire and  as intuitively expected this model class&lt;br /&gt;
 # derives from Questionnaire.&lt;br /&gt;
 class SupplementaryReviewQuestionnaire &amp;lt; Questionnaire&lt;br /&gt;
   # Make me better.&lt;br /&gt;
   attr_accessible&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review responses to &amp;quot;Show Review&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def construct_review_response code, self_id, show_tags = nil, current_user = nil&lt;br /&gt;
    code += '&amp;lt;table id=&amp;quot;review_' + self_id + '&amp;quot; style=&amp;quot;display: none;&amp;quot; class=&amp;quot;table table-bordered&amp;quot;&amp;gt;'&lt;br /&gt;
    answers = Answer.where(response_id: self.response_id)&lt;br /&gt;
    team_id = response_map.reviewee_id&lt;br /&gt;
    supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(team_id)&lt;br /&gt;
    unless answers.empty?&lt;br /&gt;
      questionnaire = self.questionnaire_by_answer(answers.first)&lt;br /&gt;
&lt;br /&gt;
      unless supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        supplementary_review_questionnaire = Questionnaire.find(supplementary_review_questionnaire_id)&lt;br /&gt;
        supplementary_review_questions = supplementary_review_questionnaire.questions.sort_by(&amp;amp;:seq)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      questionnaire_max = questionnaire.max_question_score&lt;br /&gt;
      questions = questionnaire.questions.sort_by(&amp;amp;:seq)&lt;br /&gt;
&lt;br /&gt;
      unless supplementary_review_questionnaire.nil?&lt;br /&gt;
        questions += supplementary_review_questions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      # get the tag settings this questionnaire&lt;br /&gt;
      tag_prompt_deployments = show_tags ? TagPromptDeployment.where(questionnaire_id: questionnaire.id, assignment_id: self.map.assignment.id) : nil&lt;br /&gt;
      code = add_table_rows questionnaire_max, questions, answers, code, tag_prompt_deployments, current_user&lt;br /&gt;
    end&lt;br /&gt;
    comment = if !self.additional_comment.nil?&lt;br /&gt;
                self.additional_comment.gsub('^p', '').gsub(/\n/, '&amp;lt;BR/&amp;gt;')&lt;br /&gt;
              else&lt;br /&gt;
                ''&lt;br /&gt;
              end&lt;br /&gt;
    code += '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Additional Comment: &amp;lt;/b&amp;gt;' + comment + '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;br /&gt;
    code += '&amp;lt;/table&amp;gt;'&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Views:&lt;br /&gt;
&lt;br /&gt;
app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add checkbox which professor used to indicate whether students can create their own questions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!--Add a allow studuent-generated questionnaires checkbox. --&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_form[assignment][supplementary_review_questionnaire]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_form[assignment][supplementary_review_questionnaire]', 'true', @assignment_form.assignment.supplementary_review_questionnaire) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_form[assignment][supplementary_review_questionnaire]', 'Allow student-generated questions added to rubric?') %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/response/response.html.erb&lt;br /&gt;
&lt;br /&gt;
Add code to show the supplementary questions to the reviewers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;br&amp;gt;&lt;br /&gt;
       &amp;lt;% unless @supplementary_review_questions.nil? %&amp;gt;&lt;br /&gt;
       &amp;lt;tr&amp;gt;&lt;br /&gt;
         &amp;lt;td&amp;gt;&lt;br /&gt;
           &amp;lt;h2&amp;gt;Supplementary Review Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
       &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;% @supplementary_review_questions.each do |question| %&amp;gt;&lt;br /&gt;
         &amp;lt;tr&amp;gt;&lt;br /&gt;
           &amp;lt;td&amp;gt;&lt;br /&gt;
             &amp;lt;% answer = Answer.where(question_id: question.id, response_id: @response.id).first if !@response.nil? %&amp;gt;&lt;br /&gt;
             &amp;lt;% if question.instance_of? Criterion %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score, @dropdown_or_scale) %&amp;gt;&lt;br /&gt;
               &amp;lt;%= tinymce %&amp;gt;&lt;br /&gt;
             &amp;lt;% elsif question.instance_of? Scale %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score) %&amp;gt;&lt;br /&gt;
               &amp;lt;%= tinymce %&amp;gt;&lt;br /&gt;
             &amp;lt;% elsif question.instance_of? UploadFile %&amp;gt;&lt;br /&gt;
             &amp;lt;% else %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer) %&amp;gt;&lt;br /&gt;
             &amp;lt;% end %&amp;gt;&lt;br /&gt;
           &amp;lt;/td&amp;gt;&lt;br /&gt;
           &amp;lt;td width=&amp;quot;25%&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;% if [Criterion, TextArea].include? question.class %&amp;gt;&lt;br /&gt;
                 &amp;lt;div id=&amp;quot;analysis_&amp;lt;%= i.to_s %&amp;gt;_comments&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
             &amp;lt;% end %&amp;gt;&lt;br /&gt;
           &amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;% i += 1 %&amp;gt;&lt;br /&gt;
         &amp;lt;% end %&amp;gt;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/submitted_content/_main.html.erb&lt;br /&gt;
&lt;br /&gt;
Add button for &amp;quot;your work&amp;quot; page to let students create their own questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if stage != &amp;quot;Finished&amp;quot; and controller.controller_name == 'submitted_content' and @can_submit %&amp;gt;&lt;br /&gt;
  &amp;lt;h2&amp;gt;Add Supplementary Review Questions:&amp;lt;/h2&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.supplementary_review_questionnaire? %&amp;gt;&lt;br /&gt;
      &amp;lt;%= button_to &amp;quot;Create Supplementary Rubric&amp;quot;, {:controller =&amp;gt; &amp;quot;questionnaires&amp;quot;, :action =&amp;gt; &amp;quot;create_supplementary_review_questionnaire&amp;quot;, :id =&amp;gt; participant.id } %&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
      The instructor hasn't enabled this feature for this assignment&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Controllers:&lt;br /&gt;
&lt;br /&gt;
app/controllers/response_controller.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review questionnaires part to the create, edit, update methods and some other methods which getting the questionnaires.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # Prepare the parameters when student clicks &amp;quot;Edit&amp;quot;&lt;br /&gt;
  def edit&lt;br /&gt;
    assign_instance_vars&lt;br /&gt;
    get_all_responses&lt;br /&gt;
    if @prev.present?&lt;br /&gt;
      @sorted = @review_scores.sort {|m1, m2| m1.version_num.to_i &amp;amp;&amp;amp; m2.version_num.to_i ? m2.version_num.to_i &amp;lt;=&amp;gt; m1.version_num.to_i : (m1.version_num ? -1 : 1) }&lt;br /&gt;
      @largest_version_num = @sorted[0]&lt;br /&gt;
    end&lt;br /&gt;
    @modified_object = @response.response_id&lt;br /&gt;
    # set more handy variables for the view&lt;br /&gt;
    set_content&lt;br /&gt;
    @review_scores = []&lt;br /&gt;
    @questions.each do |question|&lt;br /&gt;
      @review_scores &amp;lt;&amp;lt; Answer.where(response_id: @response.response_id, question_id: question.id).first&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @supplementary_review_questions.each do |question|&lt;br /&gt;
      @review_scores &amp;lt;&amp;lt; Answer.where(response_id: @response.response_id, question_id: question.id).first&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @questionnaire = set_questionnaire&lt;br /&gt;
    render action: 'response'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Update the response and answers when student &amp;quot;edit&amp;quot; existing response&lt;br /&gt;
  def update&lt;br /&gt;
    render nothing: true unless action_allowed?&lt;br /&gt;
    # the response to be updated&lt;br /&gt;
    @response = Response.find(params[:id])&lt;br /&gt;
    msg = &amp;quot;&amp;quot;&lt;br /&gt;
    begin&lt;br /&gt;
      @map = @response.map&lt;br /&gt;
      @response.update_attribute('additional_comment', params[:review][:comments])&lt;br /&gt;
&lt;br /&gt;
      set_questionnaire&lt;br /&gt;
      questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
      supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
      unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
        questions += supplementary_review_questions&lt;br /&gt;
      end&lt;br /&gt;
      create_answers(params, questions) unless params[:responses].nil?&lt;br /&gt;
&lt;br /&gt;
      @response.update_attribute('is_submitted', true) if params['isSubmit'] &amp;amp;&amp;amp; params['isSubmit'] == 'Yes'&lt;br /&gt;
      @response.notify_instructor_on_difference if (@map.is_a? ReviewResponseMap) &amp;amp;&amp;amp; @response.is_submitted &amp;amp;&amp;amp; @response.significant_difference?&lt;br /&gt;
    rescue StandardError&lt;br /&gt;
      msg = &amp;quot;Your response was not saved. Cause:189 #{$ERROR_INFO}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Your response was submitted: #{@response.is_submitted}&amp;quot;, request)&lt;br /&gt;
    redirect_to controller: 'response', action: 'save', id: @map.map_id,&lt;br /&gt;
                return: params[:return], msg: msg, review: params[:review], save_options: params[:save_options]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
 def create&lt;br /&gt;
    map_id = params[:id]&lt;br /&gt;
    map_id = params[:map_id] unless params[:map_id].nil? # pass map_id as a hidden field in the review form&lt;br /&gt;
    @map = ResponseMap.find(map_id)&lt;br /&gt;
    @team_id = @map.reviewee_id&lt;br /&gt;
&lt;br /&gt;
    get_all_responses&lt;br /&gt;
    if params[:review][:questionnaire_id]&lt;br /&gt;
      @questionnaire = Questionnaire.find(params[:review][:questionnaire_id])&lt;br /&gt;
      @round = params[:review][:round]&lt;br /&gt;
      @supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@team_id)&lt;br /&gt;
      unless @supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        @supplementary_review_questionnaire = Questionnaire.find(@supplementary_review_questionnaire_id)&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      @round = nil&lt;br /&gt;
    end&lt;br /&gt;
    is_submitted = (params[:isSubmit] == 'Yes')&lt;br /&gt;
    was_submitted = false&lt;br /&gt;
    @response = Response.where(map_id: @map.id, round: @round.to_i).first&lt;br /&gt;
    if @response.nil?&lt;br /&gt;
      @response = Response.create(&lt;br /&gt;
        map_id: @map.id,&lt;br /&gt;
        additional_comment: params[:review][:comments],&lt;br /&gt;
        round: @round.to_i,&lt;br /&gt;
        is_submitted: is_submitted&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
    was_submitted = @response.is_submitted&lt;br /&gt;
    @response.update(additional_comment: params[:review][:comments], is_submitted: is_submitted) # ignore if autoupdate try to save when the response object is not yet created.&lt;br /&gt;
&lt;br /&gt;
    # ,:version_num=&amp;gt;@version)&lt;br /&gt;
    # Change the order for displaying questions for editing response views.&lt;br /&gt;
    questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
&lt;br /&gt;
    unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
      supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
      questions += supplementary_review_questions&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    create_answers(params, questions) if params[:responses]&lt;br /&gt;
    msg = &amp;quot;Your response was successfully saved.&amp;quot;&lt;br /&gt;
    error_msg = &amp;quot;&amp;quot;&lt;br /&gt;
    # only notify if is_submitted changes from false to true&lt;br /&gt;
    if (@map.is_a? ReviewResponseMap) &amp;amp;&amp;amp; (was_submitted == false &amp;amp;&amp;amp; @response.is_submitted) &amp;amp;&amp;amp; @response.significant_difference?&lt;br /&gt;
      @response.notify_instructor_on_difference&lt;br /&gt;
      @response.email&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'response', action: 'save', id: @map.map_id,&lt;br /&gt;
                return: params[:return], msg: msg, error_msg: error_msg, review: params[:review], save_options: params[:save_options]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  # new_response if a flag parameter indicating that if user is requesting a new rubric to fill&lt;br /&gt;
  # if true: we figure out which questionnaire to use based on current time and records in assignment_questionnaires table&lt;br /&gt;
  # e.g. student click &amp;quot;Begin&amp;quot; or &amp;quot;Update&amp;quot; to start filling out a rubric for others' work&lt;br /&gt;
  # if false: we figure out which questionnaire to display base on @response object&lt;br /&gt;
  # e.g. student click &amp;quot;Edit&amp;quot; or &amp;quot;View&amp;quot;&lt;br /&gt;
  def set_content(new_response = false)&lt;br /&gt;
    @title = @map.get_title&lt;br /&gt;
    if @map.survey?&lt;br /&gt;
      @survey_parent = @map.survey_parent&lt;br /&gt;
    else&lt;br /&gt;
      @assignment = @map.assignment&lt;br /&gt;
    end&lt;br /&gt;
    @participant = @map.reviewer&lt;br /&gt;
    @contributor = @map.contributor&lt;br /&gt;
    new_response ? set_questionnaire_for_new_response : set_questionnaire&lt;br /&gt;
    set_dropdown_or_scale&lt;br /&gt;
    @questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
&lt;br /&gt;
    unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
      @supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @min = @questionnaire.min_question_score&lt;br /&gt;
    @max = @questionnaire.max_question_score&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_questionnaire_for_new_response&lt;br /&gt;
    case @map.type&lt;br /&gt;
    when &amp;quot;ReviewResponseMap&amp;quot;, &amp;quot;SelfReviewResponseMap&amp;quot;&lt;br /&gt;
      reviewees_topic = SignedUpTeam.topic_id_by_team_id(@contributor.id)&lt;br /&gt;
      @current_round = @assignment.number_of_current_round(reviewees_topic)&lt;br /&gt;
      @questionnaire = @map.questionnaire(@current_round)&lt;br /&gt;
&lt;br /&gt;
      @supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@contributor.id)&lt;br /&gt;
      unless @supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        @supplementary_review_questionnaire = Questionnaire.find(@supplementary_review_questionnaire_id)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
    when&lt;br /&gt;
      &amp;quot;MetareviewResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;TeammateReviewResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;FeedbackResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;CourseSurveyResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;AssignmentSurveyResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;GlobalSurveyResponseMap&amp;quot;&lt;br /&gt;
      @questionnaire = @map.questionnaire&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_questionnaire&lt;br /&gt;
    # if user is not filling a new rubric, the @response object should be available.&lt;br /&gt;
    # we can find the questionnaire from the question_id in answers&lt;br /&gt;
    answer = @response.scores.first&lt;br /&gt;
    @questionnaire = @response.questionnaire_by_answer(answer)&lt;br /&gt;
&lt;br /&gt;
    supplementary_review_answer = @response.scores.last&lt;br /&gt;
    @supplementary_review_questionnaire = @response.questionnaire_by_answer(supplementary_review_answer)&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review responses to &amp;quot;Your Scores&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def view_team&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @team = @participant.team&lt;br /&gt;
    @team_id = @team.id&lt;br /&gt;
    @questions = {}&lt;br /&gt;
    questionnaires = @assignment.questionnaires&lt;br /&gt;
    retrieve_questions questionnaires&lt;br /&gt;
    @pscore = @participant.scores(@questions)&lt;br /&gt;
    @vmlist = []&lt;br /&gt;
&lt;br /&gt;
    # loop through each questionnaire, and populate the view model for all data necessary&lt;br /&gt;
    # to render the html tables.&lt;br /&gt;
    counter_for_same_rubric = 0&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      @round = nil&lt;br /&gt;
      if @assignment.varying_rubrics_by_round? &amp;amp;&amp;amp; questionnaire.type == &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
        questionnaires = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id)&lt;br /&gt;
        if questionnaires.count &amp;gt; 1&lt;br /&gt;
          @round = questionnaires[counter_for_same_rubric].used_in_round&lt;br /&gt;
          counter_for_same_rubric += 1&lt;br /&gt;
        else&lt;br /&gt;
          @round = questionnaires[0].used_in_round&lt;br /&gt;
          counter_for_same_rubric = 0&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      vm = VmQuestionResponse.new(questionnaire, @assignment, @round)&lt;br /&gt;
      supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@team_id)&lt;br /&gt;
      unless supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        supplementary_review_questionnaire = Questionnaire.find(supplementary_review_questionnaire_id)&lt;br /&gt;
        unless supplementary_review_questionnaire.nil?&lt;br /&gt;
          supplementary_review_questions = supplementary_review_questionnaire.questions&lt;br /&gt;
          questionnaire.questions += supplementary_review_questions&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      vmquestions = questionnaire.questions&lt;br /&gt;
      vm.add_questions(vmquestions)&lt;br /&gt;
      vm.add_team_members(@team)&lt;br /&gt;
      vm.add_reviews(@participant, @team, @assignment.varying_rubrics_by_round?)&lt;br /&gt;
      vm.get_number_of_comments_greater_than_10_words&lt;br /&gt;
      @vmlist &amp;lt;&amp;lt; vm&lt;br /&gt;
    end&lt;br /&gt;
    @current_role_name = current_role_name&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
Method for creating Supplementary Review Questionnaire.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   def create_supplementary_review_questionnaire&lt;br /&gt;
     @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
     @team = Team.find(@participant.team.id)&lt;br /&gt;
     if @team.supplementary_review_questionnaire_id.nil?&lt;br /&gt;
       @questionnaire = Questionnaire.create(privete: false, name: &amp;quot;supplementary_review_questionnaire_&amp;quot; + @team.id.to_s,&lt;br /&gt;
         instructor_id: @team_id, min_question_score: 0, max_question_score: 5, type: &amp;quot;Questionnaire&amp;quot;, display_type: &amp;quot;Review&amp;quot;&lt;br /&gt;
         instruction_loc: Questionnaire::DEFAULT_QUESTIONNAIRE_URL)&lt;br /&gt;
       if @questionnaire.save&lt;br /&gt;
         @team.supplementary_review_questionnaire_id = @questionnaire.id&lt;br /&gt;
         @team.save&lt;br /&gt;
         flash[:success] = 'You have successfully created a rubric!'&lt;br /&gt;
       else&lt;br /&gt;
         flash[:error] = $ERROR_INFO&lt;br /&gt;
       end&lt;br /&gt;
     else&lt;br /&gt;
       @questionnaire = Questionnaire.find(@team.supplementary_review_questionnaire_id)&lt;br /&gt;
     end&lt;br /&gt;
     redirect_to controller: 'questionnaires', action: 'edit', id: @questionnaire.id&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Config:&lt;br /&gt;
&lt;br /&gt;
routes.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  resources :questionnaires, only: %i[new create edit update] do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :copy&lt;br /&gt;
      get :list&lt;br /&gt;
      post :list_questionnaires&lt;br /&gt;
      get :new_quiz&lt;br /&gt;
      get :select_questionnaire_type&lt;br /&gt;
      post :select_questionnaire_type&lt;br /&gt;
      get :toggle_access&lt;br /&gt;
      get :view&lt;br /&gt;
      post :create_quiz_questionnaire&lt;br /&gt;
      post :update_quiz&lt;br /&gt;
      post :add_new_questions&lt;br /&gt;
      post :save_all_questions&lt;br /&gt;
      post :create_supplementary_review_questionnaire&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  resources :author_feedback_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :review_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :metareview_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :teammate_review_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :assignment_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :global_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :course_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :bookmarkrating_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :supplementary_review_questionnaire, controller: :questionnaires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Team members'''&lt;br /&gt;
----&lt;br /&gt;
Yanchen Zhao&lt;br /&gt;
&lt;br /&gt;
Pingping Chen&lt;br /&gt;
&lt;br /&gt;
Jianshu Zhang&lt;br /&gt;
&lt;br /&gt;
Zirun Han&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Links'''&lt;br /&gt;
----&lt;br /&gt;
Expertiza on Github:https://github.com/zyczyh/expertiza&lt;br /&gt;
&lt;br /&gt;
Pull Request:https://github.com/expertiza/expertiza/pull/1325&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:https://youtu.be/3PUNknSbU-k&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128239</id>
		<title>CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1981._Student-generated_questions_added_to_rubric&amp;diff=128239"/>
		<updated>2019-11-10T22:48:28Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: Created page with &amp;quot;'''Introduction''' ---- The rubrics in expertiza are created by instructors. These Rubrics only contain questions that are related to the existed topics. Now, Expertiza only supp...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Introduction'''&lt;br /&gt;
----&lt;br /&gt;
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 (E1879) 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Proposed solution'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
''Design Strategy''&lt;br /&gt;
&lt;br /&gt;
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). So that we will add a new subclass of Questionnaire named SupplementaryReviewQuestionnaire to achieve our goal.&lt;br /&gt;
 &lt;br /&gt;
First, we want the professor to control if the students can create their own supplementary questions by using a checkbox to indicate. If the professor allow students to create their own questions, there will be a button in the students &amp;quot;Your work&amp;quot; page which can let the students jump to the same page that an instructor lands on when creating a new rubric. Then we will add the questionnaire id of this new SupplementaryReviewQuestionnaire to the Team table when students create their own questionnaire in order to show the corresponding supplementary questions to the reviewers. And when showing review questions to the reviewers we will look up the questionnaire id in Team table and modify the view to add the supplementary questions to review page. Finally, after the reviewers finish the review and submit their responds, we will change the view and let the team member can see the feedback of their supplementary questions.&lt;br /&gt;
&lt;br /&gt;
''Changes in the User Interface''&lt;br /&gt;
&lt;br /&gt;
1. Assignment Page&lt;br /&gt;
&lt;br /&gt;
We add a checkbox for the professor to indicate if student can add their own questions.&lt;br /&gt;
&lt;br /&gt;
[[File:Yzhao47_1.png]]&lt;br /&gt;
   &lt;br /&gt;
2. A button called &amp;quot;Create Supplementary Rubric&amp;quot; will appear in the student's &amp;quot;Your Work&amp;quot; section when the Instructor has allowed students to create supplementary review questions. So when a student clicks the button he/she can add the desired questions.&lt;br /&gt;
&lt;br /&gt;
[[File:Yzhao47_2.png]]&lt;br /&gt;
&lt;br /&gt;
3. The page where student will be directed to when he/she clicks the Create Supplementary Rubric button. Students can add Questions to the created Supplementary Review questionnaire here.&lt;br /&gt;
&lt;br /&gt;
[[File:Yzhao47_3.png]]&lt;br /&gt;
&lt;br /&gt;
4. Review Page&lt;br /&gt;
&lt;br /&gt;
The students own supplementary questions are leading by a heading &amp;quot;Supplementary Review Questions&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
[[File:Yzhao47_4.png]]&lt;br /&gt;
&lt;br /&gt;
5. Review Results Page&lt;br /&gt;
&lt;br /&gt;
The supplementary review results will be showed to the team like other results. &lt;br /&gt;
&lt;br /&gt;
[[File:Yzhao47_5.png]]&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''Use Cases'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
1. Use case of creating a Supplementary Review Questionnaire&lt;br /&gt;
&lt;br /&gt;
[[File:case1.jpg]]&lt;br /&gt;
&lt;br /&gt;
2. Use case of reviewing questions for reviewers.&lt;br /&gt;
&lt;br /&gt;
[[File:case2.jpg]]&lt;br /&gt;
&lt;br /&gt;
3. Use case of reviewing responses of questions.&lt;br /&gt;
&lt;br /&gt;
[[File:case3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Plan'''&lt;br /&gt;
----&lt;br /&gt;
Actually, we need to add tests for the following:&lt;br /&gt;
&lt;br /&gt;
1. To check the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; appears in the &amp;quot;Your Work&amp;quot; section of a student.&lt;br /&gt;
&lt;br /&gt;
2. To check if the link for &amp;quot;Supplementary Review Questionnaire&amp;quot; redirects to page which allows to create questionnaire.&lt;br /&gt;
&lt;br /&gt;
3. To check if the questionnaire ID is stored in the Team table.&lt;br /&gt;
&lt;br /&gt;
4. To check if the reviewers can see the supplementary questions that were added by the team as part of the review questions.&lt;br /&gt;
&lt;br /&gt;
5. To check if the responses of the Supplementary Review Questions have been added to the responses of the existing review questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''File which are added/modified'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Note: Because the pull request contains some code irrelevant to this project which make it confusing, we post our code here for you to read clearly.&lt;br /&gt;
&lt;br /&gt;
1. Models&lt;br /&gt;
&lt;br /&gt;
app/models/team.rb&lt;br /&gt;
&lt;br /&gt;
Look up the questionnaire ID of a team.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.get_supplementary_review_questionnaire_id_of_team(team_id)&lt;br /&gt;
    team = Team.find(team_id)&lt;br /&gt;
    if team.blank?&lt;br /&gt;
      nil&lt;br /&gt;
    else&lt;br /&gt;
      team.supplementary_review_questionnaire_id&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/supplementary_review_questionnaire.rb&lt;br /&gt;
&lt;br /&gt;
Add the SupplementaryReviewQuestionnaire class which is the subclass of Questionnaire.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # This is one type of Questionnaire and  as intuitively expected this model class&lt;br /&gt;
 # derives from Questionnaire.&lt;br /&gt;
 class SupplementaryReviewQuestionnaire &amp;lt; Questionnaire&lt;br /&gt;
   # Make me better.&lt;br /&gt;
   attr_accessible&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review responses to &amp;quot;Show Review&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def construct_review_response code, self_id, show_tags = nil, current_user = nil&lt;br /&gt;
    code += '&amp;lt;table id=&amp;quot;review_' + self_id + '&amp;quot; style=&amp;quot;display: none;&amp;quot; class=&amp;quot;table table-bordered&amp;quot;&amp;gt;'&lt;br /&gt;
    answers = Answer.where(response_id: self.response_id)&lt;br /&gt;
    team_id = response_map.reviewee_id&lt;br /&gt;
    supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(team_id)&lt;br /&gt;
    unless answers.empty?&lt;br /&gt;
      questionnaire = self.questionnaire_by_answer(answers.first)&lt;br /&gt;
&lt;br /&gt;
      unless supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        supplementary_review_questionnaire = Questionnaire.find(supplementary_review_questionnaire_id)&lt;br /&gt;
        supplementary_review_questions = supplementary_review_questionnaire.questions.sort_by(&amp;amp;:seq)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      questionnaire_max = questionnaire.max_question_score&lt;br /&gt;
      questions = questionnaire.questions.sort_by(&amp;amp;:seq)&lt;br /&gt;
&lt;br /&gt;
      unless supplementary_review_questionnaire.nil?&lt;br /&gt;
        questions += supplementary_review_questions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      # get the tag settings this questionnaire&lt;br /&gt;
      tag_prompt_deployments = show_tags ? TagPromptDeployment.where(questionnaire_id: questionnaire.id, assignment_id: self.map.assignment.id) : nil&lt;br /&gt;
      code = add_table_rows questionnaire_max, questions, answers, code, tag_prompt_deployments, current_user&lt;br /&gt;
    end&lt;br /&gt;
    comment = if !self.additional_comment.nil?&lt;br /&gt;
                self.additional_comment.gsub('^p', '').gsub(/\n/, '&amp;lt;BR/&amp;gt;')&lt;br /&gt;
              else&lt;br /&gt;
                ''&lt;br /&gt;
              end&lt;br /&gt;
    code += '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Additional Comment: &amp;lt;/b&amp;gt;' + comment + '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;br /&gt;
    code += '&amp;lt;/table&amp;gt;'&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Views:&lt;br /&gt;
&lt;br /&gt;
app/views/assignments/edit/_rubrics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add checkbox which professor used to indicate whether students can create their own questions. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;!--Add a allow studuent-generated questionnaires checkbox. --&amp;gt;&lt;br /&gt;
 &amp;lt;input name=&amp;quot;assignment_form[assignment][supplementary_review_questionnaire]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;%= check_box_tag('assignment_form[assignment][supplementary_review_questionnaire]', 'true', @assignment_form.assignment.supplementary_review_questionnaire) %&amp;gt;&lt;br /&gt;
 &amp;lt;%= label_tag('assignment_form[assignment][supplementary_review_questionnaire]', 'Allow student-generated questions added to rubric?') %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/response/response.html.erb&lt;br /&gt;
&lt;br /&gt;
Add code to show the supplementary questions to the reviewers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;br&amp;gt;&lt;br /&gt;
       &amp;lt;% unless @supplementary_review_questions.nil? %&amp;gt;&lt;br /&gt;
       &amp;lt;tr&amp;gt;&lt;br /&gt;
         &amp;lt;td&amp;gt;&lt;br /&gt;
           &amp;lt;h2&amp;gt;Supplementary Review Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
       &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;% @supplementary_review_questions.each do |question| %&amp;gt;&lt;br /&gt;
         &amp;lt;tr&amp;gt;&lt;br /&gt;
           &amp;lt;td&amp;gt;&lt;br /&gt;
             &amp;lt;% answer = Answer.where(question_id: question.id, response_id: @response.id).first if !@response.nil? %&amp;gt;&lt;br /&gt;
             &amp;lt;% if question.instance_of? Criterion %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score, @dropdown_or_scale) %&amp;gt;&lt;br /&gt;
               &amp;lt;%= tinymce %&amp;gt;&lt;br /&gt;
             &amp;lt;% elsif question.instance_of? Scale %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score) %&amp;gt;&lt;br /&gt;
               &amp;lt;%= tinymce %&amp;gt;&lt;br /&gt;
             &amp;lt;% elsif question.instance_of? UploadFile %&amp;gt;&lt;br /&gt;
             &amp;lt;% else %&amp;gt;&lt;br /&gt;
               &amp;lt;%= question.complete(i, answer) %&amp;gt;&lt;br /&gt;
             &amp;lt;% end %&amp;gt;&lt;br /&gt;
           &amp;lt;/td&amp;gt;&lt;br /&gt;
           &amp;lt;td width=&amp;quot;25%&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;% if [Criterion, TextArea].include? question.class %&amp;gt;&lt;br /&gt;
                 &amp;lt;div id=&amp;quot;analysis_&amp;lt;%= i.to_s %&amp;gt;_comments&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
             &amp;lt;% end %&amp;gt;&lt;br /&gt;
           &amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;/tr&amp;gt;&lt;br /&gt;
         &amp;lt;% i += 1 %&amp;gt;&lt;br /&gt;
         &amp;lt;% end %&amp;gt;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/submitted_content/_main.html.erb&lt;br /&gt;
&lt;br /&gt;
Add button for &amp;quot;your work&amp;quot; page to let students create their own questions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if stage != &amp;quot;Finished&amp;quot; and controller.controller_name == 'submitted_content' and @can_submit %&amp;gt;&lt;br /&gt;
  &amp;lt;h2&amp;gt;Add Supplementary Review Questions:&amp;lt;/h2&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.supplementary_review_questionnaire? %&amp;gt;&lt;br /&gt;
      &amp;lt;%= button_to &amp;quot;Create Supplementary Rubric&amp;quot;, {:controller =&amp;gt; &amp;quot;questionnaires&amp;quot;, :action =&amp;gt; &amp;quot;create_supplementary_review_questionnaire&amp;quot;, :id =&amp;gt; participant.id } %&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
      The instructor hasn't enabled this feature for this assignment&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Controllers:&lt;br /&gt;
&lt;br /&gt;
app/controllers/response_controller.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review questionnaires part to the create, edit, update methods and some other methods which getting the questionnaires.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # Prepare the parameters when student clicks &amp;quot;Edit&amp;quot;&lt;br /&gt;
  def edit&lt;br /&gt;
    assign_instance_vars&lt;br /&gt;
    get_all_responses&lt;br /&gt;
    if @prev.present?&lt;br /&gt;
      @sorted = @review_scores.sort {|m1, m2| m1.version_num.to_i &amp;amp;&amp;amp; m2.version_num.to_i ? m2.version_num.to_i &amp;lt;=&amp;gt; m1.version_num.to_i : (m1.version_num ? -1 : 1) }&lt;br /&gt;
      @largest_version_num = @sorted[0]&lt;br /&gt;
    end&lt;br /&gt;
    @modified_object = @response.response_id&lt;br /&gt;
    # set more handy variables for the view&lt;br /&gt;
    set_content&lt;br /&gt;
    @review_scores = []&lt;br /&gt;
    @questions.each do |question|&lt;br /&gt;
      @review_scores &amp;lt;&amp;lt; Answer.where(response_id: @response.response_id, question_id: question.id).first&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @supplementary_review_questions.each do |question|&lt;br /&gt;
      @review_scores &amp;lt;&amp;lt; Answer.where(response_id: @response.response_id, question_id: question.id).first&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @questionnaire = set_questionnaire&lt;br /&gt;
    render action: 'response'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Update the response and answers when student &amp;quot;edit&amp;quot; existing response&lt;br /&gt;
  def update&lt;br /&gt;
    render nothing: true unless action_allowed?&lt;br /&gt;
    # the response to be updated&lt;br /&gt;
    @response = Response.find(params[:id])&lt;br /&gt;
    msg = &amp;quot;&amp;quot;&lt;br /&gt;
    begin&lt;br /&gt;
      @map = @response.map&lt;br /&gt;
      @response.update_attribute('additional_comment', params[:review][:comments])&lt;br /&gt;
&lt;br /&gt;
      set_questionnaire&lt;br /&gt;
      questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
      supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
      unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
        questions += supplementary_review_questions&lt;br /&gt;
      end&lt;br /&gt;
      create_answers(params, questions) unless params[:responses].nil?&lt;br /&gt;
&lt;br /&gt;
      @response.update_attribute('is_submitted', true) if params['isSubmit'] &amp;amp;&amp;amp; params['isSubmit'] == 'Yes'&lt;br /&gt;
      @response.notify_instructor_on_difference if (@map.is_a? ReviewResponseMap) &amp;amp;&amp;amp; @response.is_submitted &amp;amp;&amp;amp; @response.significant_difference?&lt;br /&gt;
    rescue StandardError&lt;br /&gt;
      msg = &amp;quot;Your response was not saved. Cause:189 #{$ERROR_INFO}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, &amp;quot;Your response was submitted: #{@response.is_submitted}&amp;quot;, request)&lt;br /&gt;
    redirect_to controller: 'response', action: 'save', id: @map.map_id,&lt;br /&gt;
                return: params[:return], msg: msg, review: params[:review], save_options: params[:save_options]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
 def create&lt;br /&gt;
    map_id = params[:id]&lt;br /&gt;
    map_id = params[:map_id] unless params[:map_id].nil? # pass map_id as a hidden field in the review form&lt;br /&gt;
    @map = ResponseMap.find(map_id)&lt;br /&gt;
    @team_id = @map.reviewee_id&lt;br /&gt;
&lt;br /&gt;
    get_all_responses&lt;br /&gt;
    if params[:review][:questionnaire_id]&lt;br /&gt;
      @questionnaire = Questionnaire.find(params[:review][:questionnaire_id])&lt;br /&gt;
      @round = params[:review][:round]&lt;br /&gt;
      @supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@team_id)&lt;br /&gt;
      unless @supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        @supplementary_review_questionnaire = Questionnaire.find(@supplementary_review_questionnaire_id)&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      @round = nil&lt;br /&gt;
    end&lt;br /&gt;
    is_submitted = (params[:isSubmit] == 'Yes')&lt;br /&gt;
    was_submitted = false&lt;br /&gt;
    @response = Response.where(map_id: @map.id, round: @round.to_i).first&lt;br /&gt;
    if @response.nil?&lt;br /&gt;
      @response = Response.create(&lt;br /&gt;
        map_id: @map.id,&lt;br /&gt;
        additional_comment: params[:review][:comments],&lt;br /&gt;
        round: @round.to_i,&lt;br /&gt;
        is_submitted: is_submitted&lt;br /&gt;
      )&lt;br /&gt;
    end&lt;br /&gt;
    was_submitted = @response.is_submitted&lt;br /&gt;
    @response.update(additional_comment: params[:review][:comments], is_submitted: is_submitted) # ignore if autoupdate try to save when the response object is not yet created.&lt;br /&gt;
&lt;br /&gt;
    # ,:version_num=&amp;gt;@version)&lt;br /&gt;
    # Change the order for displaying questions for editing response views.&lt;br /&gt;
    questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
&lt;br /&gt;
    unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
      supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
      questions += supplementary_review_questions&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    create_answers(params, questions) if params[:responses]&lt;br /&gt;
    msg = &amp;quot;Your response was successfully saved.&amp;quot;&lt;br /&gt;
    error_msg = &amp;quot;&amp;quot;&lt;br /&gt;
    # only notify if is_submitted changes from false to true&lt;br /&gt;
    if (@map.is_a? ReviewResponseMap) &amp;amp;&amp;amp; (was_submitted == false &amp;amp;&amp;amp; @response.is_submitted) &amp;amp;&amp;amp; @response.significant_difference?&lt;br /&gt;
      @response.notify_instructor_on_difference&lt;br /&gt;
      @response.email&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to controller: 'response', action: 'save', id: @map.map_id,&lt;br /&gt;
                return: params[:return], msg: msg, error_msg: error_msg, review: params[:review], save_options: params[:save_options]&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  # new_response if a flag parameter indicating that if user is requesting a new rubric to fill&lt;br /&gt;
  # if true: we figure out which questionnaire to use based on current time and records in assignment_questionnaires table&lt;br /&gt;
  # e.g. student click &amp;quot;Begin&amp;quot; or &amp;quot;Update&amp;quot; to start filling out a rubric for others' work&lt;br /&gt;
  # if false: we figure out which questionnaire to display base on @response object&lt;br /&gt;
  # e.g. student click &amp;quot;Edit&amp;quot; or &amp;quot;View&amp;quot;&lt;br /&gt;
  def set_content(new_response = false)&lt;br /&gt;
    @title = @map.get_title&lt;br /&gt;
    if @map.survey?&lt;br /&gt;
      @survey_parent = @map.survey_parent&lt;br /&gt;
    else&lt;br /&gt;
      @assignment = @map.assignment&lt;br /&gt;
    end&lt;br /&gt;
    @participant = @map.reviewer&lt;br /&gt;
    @contributor = @map.contributor&lt;br /&gt;
    new_response ? set_questionnaire_for_new_response : set_questionnaire&lt;br /&gt;
    set_dropdown_or_scale&lt;br /&gt;
    @questions = sort_questions(@questionnaire.questions)&lt;br /&gt;
&lt;br /&gt;
    unless @supplementary_review_questionnaire.nil?&lt;br /&gt;
      @supplementary_review_questions = sort_questions(@supplementary_review_questionnaire.questions)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @min = @questionnaire.min_question_score&lt;br /&gt;
    @max = @questionnaire.max_question_score&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_questionnaire_for_new_response&lt;br /&gt;
    case @map.type&lt;br /&gt;
    when &amp;quot;ReviewResponseMap&amp;quot;, &amp;quot;SelfReviewResponseMap&amp;quot;&lt;br /&gt;
      reviewees_topic = SignedUpTeam.topic_id_by_team_id(@contributor.id)&lt;br /&gt;
      @current_round = @assignment.number_of_current_round(reviewees_topic)&lt;br /&gt;
      @questionnaire = @map.questionnaire(@current_round)&lt;br /&gt;
&lt;br /&gt;
      @supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@contributor.id)&lt;br /&gt;
      unless @supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        @supplementary_review_questionnaire = Questionnaire.find(@supplementary_review_questionnaire_id)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
    when&lt;br /&gt;
      &amp;quot;MetareviewResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;TeammateReviewResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;FeedbackResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;CourseSurveyResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;AssignmentSurveyResponseMap&amp;quot;,&lt;br /&gt;
      &amp;quot;GlobalSurveyResponseMap&amp;quot;&lt;br /&gt;
      @questionnaire = @map.questionnaire&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def set_questionnaire&lt;br /&gt;
    # if user is not filling a new rubric, the @response object should be available.&lt;br /&gt;
    # we can find the questionnaire from the question_id in answers&lt;br /&gt;
    answer = @response.scores.first&lt;br /&gt;
    @questionnaire = @response.questionnaire_by_answer(answer)&lt;br /&gt;
&lt;br /&gt;
    supplementary_review_answer = @response.scores.last&lt;br /&gt;
    @supplementary_review_questionnaire = @response.questionnaire_by_answer(supplementary_review_answer)&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/controllers/grades_controller.rb&lt;br /&gt;
&lt;br /&gt;
Add supplementary review responses to &amp;quot;Your Scores&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def view_team&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    @team = @participant.team&lt;br /&gt;
    @team_id = @team.id&lt;br /&gt;
    @questions = {}&lt;br /&gt;
    questionnaires = @assignment.questionnaires&lt;br /&gt;
    retrieve_questions questionnaires&lt;br /&gt;
    @pscore = @participant.scores(@questions)&lt;br /&gt;
    @vmlist = []&lt;br /&gt;
&lt;br /&gt;
    # loop through each questionnaire, and populate the view model for all data necessary&lt;br /&gt;
    # to render the html tables.&lt;br /&gt;
    counter_for_same_rubric = 0&lt;br /&gt;
    questionnaires.each do |questionnaire|&lt;br /&gt;
      @round = nil&lt;br /&gt;
      if @assignment.varying_rubrics_by_round? &amp;amp;&amp;amp; questionnaire.type == &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
        questionnaires = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id)&lt;br /&gt;
        if questionnaires.count &amp;gt; 1&lt;br /&gt;
          @round = questionnaires[counter_for_same_rubric].used_in_round&lt;br /&gt;
          counter_for_same_rubric += 1&lt;br /&gt;
        else&lt;br /&gt;
          @round = questionnaires[0].used_in_round&lt;br /&gt;
          counter_for_same_rubric = 0&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      vm = VmQuestionResponse.new(questionnaire, @assignment, @round)&lt;br /&gt;
      supplementary_review_questionnaire_id = Team.get_supplementary_review_questionnaire_id_of_team(@team_id)&lt;br /&gt;
      unless supplementary_review_questionnaire_id.nil?&lt;br /&gt;
        supplementary_review_questionnaire = Questionnaire.find(supplementary_review_questionnaire_id)&lt;br /&gt;
        unless supplementary_review_questionnaire.nil?&lt;br /&gt;
          supplementary_review_questions = supplementary_review_questionnaire.questions&lt;br /&gt;
          questionnaire.questions += supplementary_review_questions&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      vmquestions = questionnaire.questions&lt;br /&gt;
      vm.add_questions(vmquestions)&lt;br /&gt;
      vm.add_team_members(@team)&lt;br /&gt;
      vm.add_reviews(@participant, @team, @assignment.varying_rubrics_by_round?)&lt;br /&gt;
      vm.get_number_of_comments_greater_than_10_words&lt;br /&gt;
      @vmlist &amp;lt;&amp;lt; vm&lt;br /&gt;
    end&lt;br /&gt;
    @current_role_name = current_role_name&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/controllers/questionnaires_controller.rb&lt;br /&gt;
&lt;br /&gt;
Method for creating Supplementary Review Questionnaire.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   def create_supplementary_review_questionnaire&lt;br /&gt;
     @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
     @team = Team.find(@participant.team.id)&lt;br /&gt;
     if @team.supplementary_review_questionnaire_id.nil?&lt;br /&gt;
       @questionnaire = Questionnaire.create(privete: false, name: &amp;quot;supplementary_review_questionnaire_&amp;quot; + @team.id.to_s,&lt;br /&gt;
         instructor_id: @team_id, min_question_score: 0, max_question_score: 5, type: &amp;quot;Questionnaire&amp;quot;, display_type: &amp;quot;Review&amp;quot;&lt;br /&gt;
         instruction_loc: Questionnaire::DEFAULT_QUESTIONNAIRE_URL)&lt;br /&gt;
       if @questionnaire.save&lt;br /&gt;
         @team.supplementary_review_questionnaire_id = @questionnaire.id&lt;br /&gt;
         @team.save&lt;br /&gt;
         flash[:success] = 'You have successfully created a rubric!'&lt;br /&gt;
       else&lt;br /&gt;
         flash[:error] = $ERROR_INFO&lt;br /&gt;
       end&lt;br /&gt;
     else&lt;br /&gt;
       @questionnaire = Questionnaire.find(@team.supplementary_review_questionnaire_id)&lt;br /&gt;
     end&lt;br /&gt;
     redirect_to controller: 'questionnaires', action: 'edit', id: @questionnaire.id&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Config:&lt;br /&gt;
&lt;br /&gt;
routes.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  resources :questionnaires, only: %i[new create edit update] do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :copy&lt;br /&gt;
      get :list&lt;br /&gt;
      post :list_questionnaires&lt;br /&gt;
      get :new_quiz&lt;br /&gt;
      get :select_questionnaire_type&lt;br /&gt;
      post :select_questionnaire_type&lt;br /&gt;
      get :toggle_access&lt;br /&gt;
      get :view&lt;br /&gt;
      post :create_quiz_questionnaire&lt;br /&gt;
      post :update_quiz&lt;br /&gt;
      post :add_new_questions&lt;br /&gt;
      post :save_all_questions&lt;br /&gt;
      post :create_supplementary_review_questionnaire&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  resources :author_feedback_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :review_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :metareview_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :teammate_review_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :assignment_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :global_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :course_survey_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :bookmarkrating_questionnaires, controller: :questionnaires&lt;br /&gt;
  resources :supplementary_review_questionnaire, controller: :questionnaires&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Team members'''&lt;br /&gt;
----&lt;br /&gt;
Yanchen Zhao&lt;br /&gt;
&lt;br /&gt;
Pingping Chen&lt;br /&gt;
&lt;br /&gt;
Jianshu Zhang&lt;br /&gt;
&lt;br /&gt;
Zirun Han&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Links'''&lt;br /&gt;
----&lt;br /&gt;
Expertiza on Github:https://github.com/zyczyh/expertiza&lt;br /&gt;
&lt;br /&gt;
Pull Request:https://github.com/expertiza/expertiza/pull/1325&lt;br /&gt;
&lt;br /&gt;
Expertiza YouTube channel:https://youtu.be/3PUNknSbU-k&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=128238</id>
		<title>CSC/ECE 517 Fall 2019</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=128238"/>
		<updated>2019-11-10T22:47:34Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[CSC/ECE 517 Fall 2019 - Project E1947. Refactor quiz_questionnaire_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - Project E1965. Review report should link to the usual view for reviews]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - Project E1943. Refactor sign up sheet controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1972. OSS project J. Skellington: Accessing Assignment Rubrics]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1961. Email notification to reviewers and instructors]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1971. OSS project Finklestein: Instructors &amp;amp; Institutions]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1953. Tagging report for student]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1955.Write  unit tests for student_task.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1948. Refactor review_mapping_helper.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1959. Intelligent copying of assignments without topics]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1968. Fixes for adding members to teams]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1969. Fixes for reviews not being available]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1957. Time travel Not Allowed..!!! Restrict TAs’ ability to change their own grade + limit file-size upload]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1963. Changing assignment participant role]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1941. Issues related to topic deadlines]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1966. Tabbed_reviews partial file refactor for displaying the alternate view of reviews]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1962. Email notification upon account creation]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1967. Fix glitches in author feedback]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1960. Create new late policy successfully and fixing &amp;quot;Back&amp;quot; link]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1939. OSS Project Juniper: Bookmark enhancements]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1938. OSS project Duke Blue: Fix import glitches]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1940. Improving email notification]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1956. There is no shortcut to get free review points: Review Assignment Bug]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1942. Refactor stage deadlines in assignment.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - M1952. Missing DOM features project]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1945. Refactor users_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1964. Export review scores for projects]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1949. Write Unit Tests for Importing assignment participants and import glitches]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1944. Refactor review mapping controller]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1946. Refactor Questionnaire controller]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1982. Regulate changing of rubrics while projects are in progress]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1989. Track the time students look at other submissions]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1995. Tests for email functionality]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1993 Track Time Between Successive Tag Assignments]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1995. Weights in grade calculation]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1980. Sort instructor reports by name, ID, score, etc.]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1984. Improve self-review  Link peer review &amp;amp; self-review to derive grades]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1994. Mentor management for assignments without topics]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1997. Issues related to meta-reviewing]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric]]&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=127169</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1965. Review report should link to the usual view for reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=127169"/>
		<updated>2019-11-05T21:53:04Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Task */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Team members ==&lt;br /&gt;
# Jing Cai (jcai3@ncsu.edu)&lt;br /&gt;
# Hua Cao (hcao5@ncsu.edu)&lt;br /&gt;
# Sichao Yu (syu25@ncsu.edu)&lt;br /&gt;
# Mentor: Harsh Agrawal (hagrawa2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. The score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for score and review report which also reduce the DRY problems.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
==== Background ====&lt;br /&gt;
* Currently Review report uses its own code to display reviews. This a pretty basic view, and it does not interpret HTML codes. It should be changed so that it calls the usual code that is used for displaying reviews, that gives the circle with the score inside.&lt;br /&gt;
&lt;br /&gt;
==== Task ====&lt;br /&gt;
Currently, if you pull up a review report, and then click on one of the teams reviewed, e.g., the first one, you get a report that looks like this:&lt;br /&gt;
[[File:Team user popup before.png]] &lt;br /&gt;
&lt;br /&gt;
We need to change the views to existing templates in view_my_scores pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the review report follows different UI and have different code. To make the UI consistent we have decided to choose the UI design of student view as the base and modify the UI design for review report in instructor's view. This will allow us to use the same code in both views, thereby following DRY principle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:Team user popup after.png]]&lt;br /&gt;
&lt;br /&gt;
Our changes can shown more apparently in the following video.&amp;lt;ref&amp;gt;https://youtu.be/Kd6iaHIT3Y8&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Files modified in this project ===&lt;br /&gt;
*app/view/pop_up/team_users_popup.html.haml&lt;br /&gt;
*app/view/pop_up/team_users_popup.html.erb&lt;br /&gt;
*app/assets/stylesheets/grades.scss &lt;br /&gt;
&lt;br /&gt;
=== Solution ===&lt;br /&gt;
The specific changes can be seemed in the comments of code.&lt;br /&gt;
&lt;br /&gt;
Review report view is rendered in app/views/popup/team_users_popup.html.haml. First, we changed it to regular erb file. And fix some bugs between auto-change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot;}&lt;br /&gt;
        %tr&lt;br /&gt;
          %th{:align =&amp;gt; &amp;quot;left&amp;quot;, :width =&amp;gt; &amp;quot;50%&amp;quot;} Question&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;5%&amp;quot;} Score&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;45%&amp;quot;} Comments&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          %tr&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = Question.find(s.question_id).txt&lt;br /&gt;
            - if Question.find(s.question_id).is_a?(ScoredQuestion)&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
            - else&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = s.comments&lt;br /&gt;
        %tr&lt;br /&gt;
          %th Reviewer Score (Σ weighted score/Σ weighted available score)&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
            = instance_variable_get('@sum_round_' + round.to_s)&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We replace the above code by code below. Just simply convert haml to erb.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th&amp;gt;Reviewer Score (Σ weighted score/Σ weighted available score)&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@sum_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we change the row and col layout and css style of this view.&lt;br /&gt;
The previous tables can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                /&amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After we change the lay out, it can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table table-striped grades&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
          &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
          &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;95%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also fixed some small bug about the checkbox questions and index of the questions.&lt;br /&gt;
We fixed the if-else logic question, in order that checkbox  questions can be showed properly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We also changed the outlook of score and make it to be a circle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt; grade-circle&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the css is in grades.scss&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* This is a grade circle for different grades. */&lt;br /&gt;
.grade-circle {&lt;br /&gt;
  width:30px; &lt;br /&gt;
  height:30px; &lt;br /&gt;
  border-radius:50%; &lt;br /&gt;
  font-size:15px; &lt;br /&gt;
  color:black; &lt;br /&gt;
  line-height:30px; &lt;br /&gt;
  text-align:center;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We added the &amp;quot;index&amp;quot; in this view, in order to show the proper sequence of review's question.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;% index = 1 %&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= index%&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.  ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index +1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index + 1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At last, we add the css style &amp;quot;warning&amp;quot; and &amp;quot;info&amp;quot; for the table and review score. So that it looks more beautiful.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr class=&amp;quot;info&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt;&amp;quot; style=&amp;quot;width:30px; height:30px; border-radius:50%; font-size:15px; color:black; line-height:30px; text-align:center;&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
Our test plan are mostly manual. There are two reasons why we choose UI testing:&lt;br /&gt;
# As we only change the layout of several views. We can only test them from UI testing.&lt;br /&gt;
# The existing templates view_my_score are also tested with UI, without any Rspec testing.&lt;br /&gt;
&lt;br /&gt;
There are two test cases for UI testing.&lt;br /&gt;
* To Test UI for student View&lt;br /&gt;
** Log-in as Student.&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Click Your scores&lt;br /&gt;
** Click show reviews&lt;br /&gt;
&lt;br /&gt;
* To Test UI for instructor View&lt;br /&gt;
** Log-in as Instructor.&lt;br /&gt;
** Go to Manage Assignments&lt;br /&gt;
** Click on review report of a particular assignment&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other Links ==&lt;br /&gt;
#[https://github.com/ljxxcaijing/expertiza/tree/beta  GitHub Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1532  GitHub Pull Request]&lt;br /&gt;
#[https://youtu.be/Kd6iaHIT3Y8  Youtube Video Demo]&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Team_user_popup_after.png&amp;diff=127168</id>
		<title>File:Team user popup after.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Team_user_popup_after.png&amp;diff=127168"/>
		<updated>2019-11-05T21:52:44Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=127167</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1965. Review report should link to the usual view for reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=127167"/>
		<updated>2019-11-05T21:52:17Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Task */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Team members ==&lt;br /&gt;
# Jing Cai (jcai3@ncsu.edu)&lt;br /&gt;
# Hua Cao (hcao5@ncsu.edu)&lt;br /&gt;
# Sichao Yu (syu25@ncsu.edu)&lt;br /&gt;
# Mentor: Harsh Agrawal (hagrawa2@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. The score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for score and review report which also reduce the DRY problems.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
==== Background ====&lt;br /&gt;
* Currently Review report uses its own code to display reviews. This a pretty basic view, and it does not interpret HTML codes. It should be changed so that it calls the usual code that is used for displaying reviews, that gives the circle with the score inside.&lt;br /&gt;
&lt;br /&gt;
==== Task ====&lt;br /&gt;
Currently, if you pull up a review report, and then click on one of the teams reviewed, e.g., the first one, you get a report that looks like this:&lt;br /&gt;
[[File:Team user popup before.png]] &lt;br /&gt;
&lt;br /&gt;
We need to change the views to existing templates in view_my_scores pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the review report follows different UI and have different code. To make the UI consistent we have decided to choose the UI design of student view as the base and modify the UI design for review report in instructor's view. This will allow us to use the same code in both views, thereby following DRY principle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:Team user popup after.jpg]]&lt;br /&gt;
&lt;br /&gt;
Our changes can shown more apparently in the following video.&amp;lt;ref&amp;gt;https://youtu.be/Kd6iaHIT3Y8&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Files modified in this project ===&lt;br /&gt;
*app/view/pop_up/team_users_popup.html.haml&lt;br /&gt;
*app/view/pop_up/team_users_popup.html.erb&lt;br /&gt;
*app/assets/stylesheets/grades.scss &lt;br /&gt;
&lt;br /&gt;
=== Solution ===&lt;br /&gt;
The specific changes can be seemed in the comments of code.&lt;br /&gt;
&lt;br /&gt;
Review report view is rendered in app/views/popup/team_users_popup.html.haml. First, we changed it to regular erb file. And fix some bugs between auto-change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot;}&lt;br /&gt;
        %tr&lt;br /&gt;
          %th{:align =&amp;gt; &amp;quot;left&amp;quot;, :width =&amp;gt; &amp;quot;50%&amp;quot;} Question&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;5%&amp;quot;} Score&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;45%&amp;quot;} Comments&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          %tr&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = Question.find(s.question_id).txt&lt;br /&gt;
            - if Question.find(s.question_id).is_a?(ScoredQuestion)&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
            - else&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = s.comments&lt;br /&gt;
        %tr&lt;br /&gt;
          %th Reviewer Score (Σ weighted score/Σ weighted available score)&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
            = instance_variable_get('@sum_round_' + round.to_s)&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We replace the above code by code below. Just simply convert haml to erb.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th&amp;gt;Reviewer Score (Σ weighted score/Σ weighted available score)&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@sum_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we change the row and col layout and css style of this view.&lt;br /&gt;
The previous tables can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                /&amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After we change the lay out, it can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table table-striped grades&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
          &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
          &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;95%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also fixed some small bug about the checkbox questions and index of the questions.&lt;br /&gt;
We fixed the if-else logic question, in order that checkbox  questions can be showed properly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We also changed the outlook of score and make it to be a circle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt; grade-circle&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the css is in grades.scss&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* This is a grade circle for different grades. */&lt;br /&gt;
.grade-circle {&lt;br /&gt;
  width:30px; &lt;br /&gt;
  height:30px; &lt;br /&gt;
  border-radius:50%; &lt;br /&gt;
  font-size:15px; &lt;br /&gt;
  color:black; &lt;br /&gt;
  line-height:30px; &lt;br /&gt;
  text-align:center;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We added the &amp;quot;index&amp;quot; in this view, in order to show the proper sequence of review's question.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;% index = 1 %&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= index%&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.  ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index +1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index + 1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At last, we add the css style &amp;quot;warning&amp;quot; and &amp;quot;info&amp;quot; for the table and review score. So that it looks more beautiful.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr class=&amp;quot;info&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt;&amp;quot; style=&amp;quot;width:30px; height:30px; border-radius:50%; font-size:15px; color:black; line-height:30px; text-align:center;&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
Our test plan are mostly manual. There are two reasons why we choose UI testing:&lt;br /&gt;
# As we only change the layout of several views. We can only test them from UI testing.&lt;br /&gt;
# The existing templates view_my_score are also tested with UI, without any Rspec testing.&lt;br /&gt;
&lt;br /&gt;
There are two test cases for UI testing.&lt;br /&gt;
* To Test UI for student View&lt;br /&gt;
** Log-in as Student.&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Click Your scores&lt;br /&gt;
** Click show reviews&lt;br /&gt;
&lt;br /&gt;
* To Test UI for instructor View&lt;br /&gt;
** Log-in as Instructor.&lt;br /&gt;
** Go to Manage Assignments&lt;br /&gt;
** Click on review report of a particular assignment&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other Links ==&lt;br /&gt;
#[https://github.com/ljxxcaijing/expertiza/tree/beta  GitHub Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1532  GitHub Pull Request]&lt;br /&gt;
#[https://youtu.be/Kd6iaHIT3Y8  Youtube Video Demo]&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Team_user_popup_before.png&amp;diff=127166</id>
		<title>File:Team user popup before.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Team_user_popup_before.png&amp;diff=127166"/>
		<updated>2019-11-05T21:51:38Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Team_user_popup_before.jpeg&amp;diff=127165</id>
		<title>File:Team user popup before.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Team_user_popup_before.jpeg&amp;diff=127165"/>
		<updated>2019-11-05T21:50:10Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: uploaded a new version of &amp;amp;quot;File:Team user popup before.jpeg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125270</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1965. Review report should link to the usual view for reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125270"/>
		<updated>2019-10-26T01:04:29Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Solution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
==== Background ====&lt;br /&gt;
* Currently Review report uses its own code to display reviews. This a pretty basic view, and it does not interpret HTML codes. It should be changed so that it calls the usual code that is used for displaying reviews, that gives the circle with the score inside.&lt;br /&gt;
&lt;br /&gt;
==== Task ====&lt;br /&gt;
Currently, if you pull up a review report, and then click on one of the teams reviewed, e.g., the first one, you get a report that looks like this:&lt;br /&gt;
[[File:Team user popup before.jpeg]] &lt;br /&gt;
&lt;br /&gt;
We need to change the views to existing templates in view_my_scores pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the review report follows different UI and have different code. To make the UI consistent we have decided to choose the UI design of student view as the base and modify the UI design for review report in instructor's view. This will allow us to use the same code in both views, thereby following DRY principle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:Team user popup after.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Files modified in this project ===&lt;br /&gt;
*team_users_popup.html.haml&lt;br /&gt;
*team_users_popup.html.erb&lt;br /&gt;
&lt;br /&gt;
=== Solution ===&lt;br /&gt;
&lt;br /&gt;
Review report view is rendered in app/views/popup/team_users_popup.html.haml. First, we changed it to regular erb file. And fix some bugs between auto-change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot;}&lt;br /&gt;
        %tr&lt;br /&gt;
          %th{:align =&amp;gt; &amp;quot;left&amp;quot;, :width =&amp;gt; &amp;quot;50%&amp;quot;} Question&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;5%&amp;quot;} Score&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;45%&amp;quot;} Comments&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          %tr&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = Question.find(s.question_id).txt&lt;br /&gt;
            - if Question.find(s.question_id).is_a?(ScoredQuestion)&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
            - else&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = s.comments&lt;br /&gt;
        %tr&lt;br /&gt;
          %th Reviewer Score (Σ weighted score/Σ weighted available score)&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
            = instance_variable_get('@sum_round_' + round.to_s)&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We replace the above code by code below. Just simply convert haml to erb.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th&amp;gt;Reviewer Score (Σ weighted score/Σ weighted available score)&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@sum_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we change the row and col layout and css style of this view.&lt;br /&gt;
The previous tables can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                /&amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After we change the lay out, it can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table table-striped grades&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
          &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
          &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;95%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also fixed some small bug about the checkbox questions and index of the questions.&lt;br /&gt;
We fixed the if-else logic question, in order that checkbox  questions can be showed properly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We also changed the outlook of score and make it to be a circle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt; grade-circle&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the css is in grades.scss&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* This is a grade circle for different grades. */&lt;br /&gt;
.grade-circle {&lt;br /&gt;
  width:30px; &lt;br /&gt;
  height:30px; &lt;br /&gt;
  border-radius:50%; &lt;br /&gt;
  font-size:15px; &lt;br /&gt;
  color:black; &lt;br /&gt;
  line-height:30px; &lt;br /&gt;
  text-align:center;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We added the &amp;quot;index&amp;quot; in this view, in order to show the proper sequence of review's question.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;% index = 1 %&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= index%&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.  ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index +1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index + 1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At last, we add the css style &amp;quot;warning&amp;quot; and &amp;quot;info&amp;quot; for the table and review score. So that it looks more beautiful.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr class=&amp;quot;info&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt;&amp;quot; style=&amp;quot;width:30px; height:30px; border-radius:50%; font-size:15px; color:black; line-height:30px; text-align:center;&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
* To Test UI for student View&lt;br /&gt;
** Log-in as Student.&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Click Your scores&lt;br /&gt;
** Click show reviews&lt;br /&gt;
&lt;br /&gt;
* To Test UI for instructor View&lt;br /&gt;
** Log-in as Instructor.&lt;br /&gt;
** Go to Manage Assignments&lt;br /&gt;
** Click on review report of a particular assignment&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125269</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1965. Review report should link to the usual view for reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125269"/>
		<updated>2019-10-26T00:33:40Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Future Improvements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
==== Background ====&lt;br /&gt;
* Currently Review report uses its own code to display reviews. This a pretty basic view, and it does not interpret HTML codes. It should be changed so that it calls the usual code that is used for displaying reviews, that gives the circle with the score inside.&lt;br /&gt;
&lt;br /&gt;
==== Task ====&lt;br /&gt;
Currently, if you pull up a review report, and then click on one of the teams reviewed, e.g., the first one, you get a report that looks like this:&lt;br /&gt;
[[File:Team user popup before.jpeg]] &lt;br /&gt;
&lt;br /&gt;
We need to change the views to existing templates in view_my_scores pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the review report follows different UI and have different code. To make the UI consistent we have decided to choose the UI design of student view as the base and modify the UI design for review report in instructor's view. This will allow us to use the same code in both views, thereby following DRY principle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:Team user popup after.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Files modified in this project ===&lt;br /&gt;
*team_users_popup.html.haml&lt;br /&gt;
*team_users_popup.html.erb&lt;br /&gt;
&lt;br /&gt;
=== Solution ===&lt;br /&gt;
&lt;br /&gt;
Review report view is rendered in app/views/popup/team_users_popup.html.haml. First, we changed it to regular erb file. And fix some bugs between auto-change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot;}&lt;br /&gt;
        %tr&lt;br /&gt;
          %th{:align =&amp;gt; &amp;quot;left&amp;quot;, :width =&amp;gt; &amp;quot;50%&amp;quot;} Question&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;5%&amp;quot;} Score&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;45%&amp;quot;} Comments&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          %tr&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = Question.find(s.question_id).txt&lt;br /&gt;
            - if Question.find(s.question_id).is_a?(ScoredQuestion)&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
            - else&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = s.comments&lt;br /&gt;
        %tr&lt;br /&gt;
          %th Reviewer Score (Σ weighted score/Σ weighted available score)&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
            = instance_variable_get('@sum_round_' + round.to_s)&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We replace the above code by code below. Just simply convert haml to erb.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th&amp;gt;Reviewer Score (Σ weighted score/Σ weighted available score)&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@sum_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we change the row and col layout and css style of this view.&lt;br /&gt;
The previous tables can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                /&amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After we change the lay out, it can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table table-striped grades&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
          &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
          &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;95%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also fixed some small bug about the checkbox questions and index of the questions.&lt;br /&gt;
We fixed the if-else logic question, in order that checkbox  questions can be showed properly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We also changed the outlook of score and make it to be a circle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt;&amp;quot; style=&amp;quot;width:30px; height:30px; border-radius:50%; font-size:15px; color:black; line-height:30px; text-align:center;&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We added the &amp;quot;index&amp;quot; in this view, in order to show the proper sequence of review's question.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;% index = 1 %&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= index%&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.  ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index +1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index + 1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At last, we add the css style &amp;quot;warning&amp;quot; and &amp;quot;info&amp;quot; for the table and review score. So that it looks more beautiful.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr class=&amp;quot;info&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt;&amp;quot; style=&amp;quot;width:30px; height:30px; border-radius:50%; font-size:15px; color:black; line-height:30px; text-align:center;&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
* To Test UI for student View&lt;br /&gt;
** Log-in as Student.&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Click Your scores&lt;br /&gt;
** Click show reviews&lt;br /&gt;
&lt;br /&gt;
* To Test UI for instructor View&lt;br /&gt;
** Log-in as Instructor.&lt;br /&gt;
** Go to Manage Assignments&lt;br /&gt;
** Click on review report of a particular assignment&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125268</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1965. Review report should link to the usual view for reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125268"/>
		<updated>2019-10-26T00:32:32Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Task */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
==== Background ====&lt;br /&gt;
* Currently Review report uses its own code to display reviews. This a pretty basic view, and it does not interpret HTML codes. It should be changed so that it calls the usual code that is used for displaying reviews, that gives the circle with the score inside.&lt;br /&gt;
&lt;br /&gt;
==== Task ====&lt;br /&gt;
Currently, if you pull up a review report, and then click on one of the teams reviewed, e.g., the first one, you get a report that looks like this:&lt;br /&gt;
[[File:Team user popup before.jpeg]] &lt;br /&gt;
&lt;br /&gt;
We need to change the views to existing templates in view_my_scores pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the review report follows different UI and have different code. To make the UI consistent we have decided to choose the UI design of student view as the base and modify the UI design for review report in instructor's view. This will allow us to use the same code in both views, thereby following DRY principle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:Team user popup after.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Files modified in this project ===&lt;br /&gt;
*team_users_popup.html.haml&lt;br /&gt;
*team_users_popup.html.erb&lt;br /&gt;
&lt;br /&gt;
=== Solution ===&lt;br /&gt;
&lt;br /&gt;
Review report view is rendered in app/views/popup/team_users_popup.html.haml. First, we changed it to regular erb file. And fix some bugs between auto-change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot;}&lt;br /&gt;
        %tr&lt;br /&gt;
          %th{:align =&amp;gt; &amp;quot;left&amp;quot;, :width =&amp;gt; &amp;quot;50%&amp;quot;} Question&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;5%&amp;quot;} Score&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;45%&amp;quot;} Comments&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          %tr&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = Question.find(s.question_id).txt&lt;br /&gt;
            - if Question.find(s.question_id).is_a?(ScoredQuestion)&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
            - else&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = s.comments&lt;br /&gt;
        %tr&lt;br /&gt;
          %th Reviewer Score (Σ weighted score/Σ weighted available score)&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
            = instance_variable_get('@sum_round_' + round.to_s)&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We replace the above code by code below. Just simply convert haml to erb.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th&amp;gt;Reviewer Score (Σ weighted score/Σ weighted available score)&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@sum_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we change the row and col layout and css style of this view.&lt;br /&gt;
The previous tables can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                /&amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After we change the lay out, it can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table table-striped grades&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
          &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
          &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;95%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also fixed some small bug about the checkbox questions and index of the questions.&lt;br /&gt;
We fixed the if-else logic question, in order that checkbox  questions can be showed properly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We also changed the outlook of score and make it to be a circle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt;&amp;quot; style=&amp;quot;width:30px; height:30px; border-radius:50%; font-size:15px; color:black; line-height:30px; text-align:center;&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We added the &amp;quot;index&amp;quot; in this view, in order to show the proper sequence of review's question.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;% index = 1 %&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= index%&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.  ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index +1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index + 1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At last, we add the css style &amp;quot;warning&amp;quot; and &amp;quot;info&amp;quot; for the table and review score. So that it looks more beautiful.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr class=&amp;quot;info&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt;&amp;quot; style=&amp;quot;width:30px; height:30px; border-radius:50%; font-size:15px; color:black; line-height:30px; text-align:center;&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
* To Test UI for student View&lt;br /&gt;
** Log-in as Student.&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Click Your scores&lt;br /&gt;
** Click show reviews&lt;br /&gt;
&lt;br /&gt;
* To Test UI for instructor View&lt;br /&gt;
** Log-in as Instructor.&lt;br /&gt;
** Go to Manage Assignments&lt;br /&gt;
** Click on review report of a particular assignment&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Team_user_popup_before.jpeg&amp;diff=125267</id>
		<title>File:Team user popup before.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Team_user_popup_before.jpeg&amp;diff=125267"/>
		<updated>2019-10-26T00:27:32Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125266</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1965. Review report should link to the usual view for reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125266"/>
		<updated>2019-10-26T00:27:02Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: /* Task */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
==== Background ====&lt;br /&gt;
* Currently Review report uses its own code to display reviews. This a pretty basic view, and it does not interpret HTML codes. It should be changed so that it calls the usual code that is used for displaying reviews, that gives the circle with the score inside.&lt;br /&gt;
&lt;br /&gt;
==== Task ====&lt;br /&gt;
Currently, if you pull up a review report, and then click on one of the teams reviewed, e.g., the first one, you get a report that looks like this:&lt;br /&gt;
[[File:review_report.png]] &lt;br /&gt;
&lt;br /&gt;
We need to change the views to existing templates in view_my_scores pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the review report follows different UI and have different code. To make the UI consistent we have decided to choose the UI design of student view as the base and modify the UI design for review report in instructor's view. This will allow us to use the same code in both views, thereby following DRY principle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:Team user popup after.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Files modified in this project ===&lt;br /&gt;
*team_users_popup.html.haml&lt;br /&gt;
*team_users_popup.html.erb&lt;br /&gt;
&lt;br /&gt;
=== Solution ===&lt;br /&gt;
&lt;br /&gt;
Review report view is rendered in app/views/popup/team_users_popup.html.haml. First, we changed it to regular erb file. And fix some bugs between auto-change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot;}&lt;br /&gt;
        %tr&lt;br /&gt;
          %th{:align =&amp;gt; &amp;quot;left&amp;quot;, :width =&amp;gt; &amp;quot;50%&amp;quot;} Question&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;5%&amp;quot;} Score&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;45%&amp;quot;} Comments&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          %tr&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = Question.find(s.question_id).txt&lt;br /&gt;
            - if Question.find(s.question_id).is_a?(ScoredQuestion)&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
            - else&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = s.comments&lt;br /&gt;
        %tr&lt;br /&gt;
          %th Reviewer Score (Σ weighted score/Σ weighted available score)&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
            = instance_variable_get('@sum_round_' + round.to_s)&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We replace the above code by code below. Just simply convert haml to erb.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th&amp;gt;Reviewer Score (Σ weighted score/Σ weighted available score)&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@sum_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we change the row and col layout and css style of this view.&lt;br /&gt;
The previous tables can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                /&amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After we change the lay out, it can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table table-striped grades&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
          &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
          &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;95%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also fixed some small bug about the checkbox questions and index of the questions.&lt;br /&gt;
We fixed the if-else logic question, in order that checkbox  questions can be showed properly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We also changed the outlook of score and make it to be a circle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt;&amp;quot; style=&amp;quot;width:30px; height:30px; border-radius:50%; font-size:15px; color:black; line-height:30px; text-align:center;&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We added the &amp;quot;index&amp;quot; in this view, in order to show the proper sequence of review's question.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;% index = 1 %&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= index%&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.  ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index +1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index + 1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At last, we add the css style &amp;quot;warning&amp;quot; and &amp;quot;info&amp;quot; for the table and review score. So that it looks more beautiful.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr class=&amp;quot;info&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt;&amp;quot; style=&amp;quot;width:30px; height:30px; border-radius:50%; font-size:15px; color:black; line-height:30px; text-align:center;&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
* To Test UI for student View&lt;br /&gt;
** Log-in as Student.&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Click Your scores&lt;br /&gt;
** Click show reviews&lt;br /&gt;
&lt;br /&gt;
* To Test UI for instructor View&lt;br /&gt;
** Log-in as Instructor.&lt;br /&gt;
** Go to Manage Assignments&lt;br /&gt;
** Click on review report of a particular assignment&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Team_user_popup_after.jpg&amp;diff=125265</id>
		<title>File:Team user popup after.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Team_user_popup_after.jpg&amp;diff=125265"/>
		<updated>2019-10-26T00:25:41Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125264</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1965. Review report should link to the usual view for reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125264"/>
		<updated>2019-10-26T00:18:52Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
==== Background ====&lt;br /&gt;
* Currently Review report uses its own code to display reviews. This a pretty basic view, and it does not interpret HTML codes. It should be changed so that it calls the usual code that is used for displaying reviews, that gives the circle with the score inside.&lt;br /&gt;
&lt;br /&gt;
==== Task ====&lt;br /&gt;
Currently, if you pull up a review report, and then click on one of the teams reviewed, e.g., the first one, you get a report that looks like this:&lt;br /&gt;
[[File:review_report.png]] &lt;br /&gt;
&lt;br /&gt;
We need to change the views to existing templates in view_my_scores pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the review report follows different UI and have different code. To make the UI consistent we have decided to choose the UI design of student view as the base and modify the UI design for review report in instructor's view. This will allow us to use the same code in both views, thereby following DRY principle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:Modified review2.png]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Files modified in this project ===&lt;br /&gt;
*team_users_popup.html.haml&lt;br /&gt;
*team_users_popup.html.erb&lt;br /&gt;
&lt;br /&gt;
=== Solution ===&lt;br /&gt;
&lt;br /&gt;
Review report view is rendered in app/views/popup/team_users_popup.html.haml. First, we changed it to regular erb file. And fix some bugs between auto-change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot;}&lt;br /&gt;
        %tr&lt;br /&gt;
          %th{:align =&amp;gt; &amp;quot;left&amp;quot;, :width =&amp;gt; &amp;quot;50%&amp;quot;} Question&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;5%&amp;quot;} Score&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;45%&amp;quot;} Comments&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          %tr&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = Question.find(s.question_id).txt&lt;br /&gt;
            - if Question.find(s.question_id).is_a?(ScoredQuestion)&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
            - else&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = s.comments&lt;br /&gt;
        %tr&lt;br /&gt;
          %th Reviewer Score (Σ weighted score/Σ weighted available score)&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
            = instance_variable_get('@sum_round_' + round.to_s)&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We replace the above code by code below. Just simply convert haml to erb.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th&amp;gt;Reviewer Score (Σ weighted score/Σ weighted available score)&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@sum_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we change the row and col layout and css style of this view.&lt;br /&gt;
The previous tables can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                /&amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After we change the lay out, it can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table table-striped grades&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
          &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
          &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;95%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also fixed some small bug about the checkbox questions and index of the questions.&lt;br /&gt;
We fixed the if-else logic question, in order that checkbox  questions can be showed properly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We also changed the outlook of score and make it to be a circle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt;&amp;quot; style=&amp;quot;width:30px; height:30px; border-radius:50%; font-size:15px; color:black; line-height:30px; text-align:center;&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We added the &amp;quot;index&amp;quot; in this view, in order to show the proper sequence of review's question.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;% index = 1 %&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= index%&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.  ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index +1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index + 1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At last, we add the css style &amp;quot;warning&amp;quot; and &amp;quot;info&amp;quot; for the table and review score. So that it looks more beautiful.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr class=&amp;quot;info&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt;&amp;quot; style=&amp;quot;width:30px; height:30px; border-radius:50%; font-size:15px; color:black; line-height:30px; text-align:center;&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
* To Test UI for student View&lt;br /&gt;
** Log-in as Student.&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Click Your scores&lt;br /&gt;
** Click show reviews&lt;br /&gt;
&lt;br /&gt;
* To Test UI for instructor View&lt;br /&gt;
** Log-in as Instructor.&lt;br /&gt;
** Go to Manage Assignments&lt;br /&gt;
** Click on review report of a particular assignment&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125263</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1965. Review report should link to the usual view for reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125263"/>
		<updated>2019-10-26T00:16:45Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
==== Background ====&lt;br /&gt;
* Currently Review report uses its own code to display reviews. This a pretty basic view, and it does not interpret HTML codes. It should be changed so that it calls the usual code that is used for displaying reviews, that gives the circle with the score inside.&lt;br /&gt;
&lt;br /&gt;
==== Task ====&lt;br /&gt;
Currently, if you pull up a review report, and then click on one of the teams reviewed, e.g., the first one, you get a report that looks like this:&lt;br /&gt;
[[File:review_report.png]] &lt;br /&gt;
&lt;br /&gt;
We need to change the views to existing templates in view_my_scores pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the review report follows different UI and have different code. To make the UI consistent we have decided to choose the UI design of student view as the base and modify the UI design for review report in instructor's view. This will allow us to use the same code in both views, thereby following DRY principle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:Modified review2.png]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Files modified in this project ===&lt;br /&gt;
*team_users_popup.html.haml&lt;br /&gt;
*team_users_popup.html.erb&lt;br /&gt;
&lt;br /&gt;
=== Solution ===&lt;br /&gt;
&lt;br /&gt;
Review report view is rendered in app/views/popup/team_users_popup.html.haml. First, we changed it to regular erb file. And fix some bugs between auto-change.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot;}&lt;br /&gt;
        %tr&lt;br /&gt;
          %th{:align =&amp;gt; &amp;quot;left&amp;quot;, :width =&amp;gt; &amp;quot;50%&amp;quot;} Question&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;5%&amp;quot;} Score&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;45%&amp;quot;} Comments&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          %tr&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = Question.find(s.question_id).txt&lt;br /&gt;
            - if Question.find(s.question_id).is_a?(ScoredQuestion)&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
            - else&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = s.comments&lt;br /&gt;
        %tr&lt;br /&gt;
          %th Reviewer Score (Σ weighted score/Σ weighted available score)&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
            = instance_variable_get('@sum_round_' + round.to_s)&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We replace the above code by code below. Just simply convert haml to erb.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th&amp;gt;Reviewer Score (Σ weighted score/Σ weighted available score)&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@sum_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we change the row and col layout and css style of this view.&lt;br /&gt;
The previous tables can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1px solid #ccc&amp;quot; class=&amp;quot;general&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align=&amp;quot;left&amp;quot; width=&amp;quot;50%&amp;quot;&amp;gt;Question&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Score&amp;lt;/th&amp;gt;&lt;br /&gt;
          &amp;lt;th width=&amp;quot;45%&amp;quot;&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
          &amp;lt;tr&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
                /&amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
              &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
              &amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
            &amp;lt;td align=&amp;quot;left&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
            &amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After we change the lay out, it can be listed as below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table table-striped grades&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
          &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
          &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
          &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
          &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;95%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.comments %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also fixed some small bug about the checkbox questions and index of the questions.&lt;br /&gt;
We fixed the if-else logic question, in order that checkbox  questions can be showed properly.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer %&amp;gt;  &lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;  &lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We also changed the outlook of score and make it to be a circle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt;&amp;quot; style=&amp;quot;width:30px; height:30px; border-radius:50%; font-size:15px; color:black; line-height:30px; text-align:center;&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
         &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We added the &amp;quot;index&amp;quot; in this view, in order to show the proper sequence of review's question.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;lt;% index = 1 %&amp;gt;&lt;br /&gt;
      &amp;lt;% instance_variable_get('@scores_round_' + round.to_s).each do |answer| %&amp;gt;&lt;br /&gt;
      &amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= index%&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '. ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.  ' %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '[Max points: '%&amp;gt;&lt;br /&gt;
            &amp;lt;%= instance_variable_get('@max_score_round_' + round.to_s) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= ']'%&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index +1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% elsif answer.question.is_a?(Checkbox) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= '.' %&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
            &amp;lt;%= answer.answer==0 ? image_tag(&amp;quot;delete_icon.png&amp;quot;): image_tag(&amp;quot;Check-icon.png&amp;quot;) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.txt %&amp;gt;&lt;br /&gt;
            &amp;lt;% index = index + 1 %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At last, we add the css style &amp;quot;warning&amp;quot; and &amp;quot;info&amp;quot; for the table and review score. So that it looks more beautiful.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
            &amp;lt;%= answer.question.seq.to_i %&amp;gt;&lt;br /&gt;
        &amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr class=&amp;quot;info&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;% if answer.question.is_a?(ScoredQuestion) %&amp;gt;&lt;br /&gt;
          &amp;lt;td align=&amp;quot;left&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;c&amp;lt;%= answer.answer %&amp;gt;&amp;quot; style=&amp;quot;width:30px; height:30px; border-radius:50%; font-size:15px; color:black; line-height:30px; text-align:center;&amp;quot;&amp;gt;&amp;lt;%= answer.answer %&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
* To Test UI for student View&lt;br /&gt;
** Log-in as Student.&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Click Your scores&lt;br /&gt;
** Click show reviews&lt;br /&gt;
&lt;br /&gt;
* To Test UI for instructor View&lt;br /&gt;
** Log-in as Instructor.&lt;br /&gt;
** Go to Manage Assignments&lt;br /&gt;
** Click on review report of a particular assignment&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125165</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1965. Review report should link to the usual view for reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1965._Review_report_should_link_to_the_usual_view_for_reviews&amp;diff=125165"/>
		<updated>2019-10-21T19:52:35Z</updated>

		<summary type="html">&lt;p&gt;Hcao5: Created page with &amp;quot;== Introduction ==  Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incr...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Expertiza&amp;lt;ref&amp;gt;https://expertiza.ncsu.edu/&amp;lt;/ref&amp;gt; is an open-source web application to create re-usable learning objects through peer-reviews to facilitate incremental learning. Students can submit learning objects such as articles, wiki pages, repository links and with the help of peer reviews, improve them. The project has been developed using the Ruby on Rails&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Ruby_on_Rails&amp;lt;/ref&amp;gt; framework and is supported by the [http://www.nsf.gov National Science Foundation].&lt;br /&gt;
&lt;br /&gt;
== Project Description ==&lt;br /&gt;
&lt;br /&gt;
=== Purpose and Scope ===&lt;br /&gt;
&lt;br /&gt;
Expertiza assignments are based on a peer review system where the instructor creates rubrics for an assignment through questionnaires which students use to review other students' submissions. The author of the submission is given an opportunity to provide feedback about these reviews. Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote. Both score report and review report use different code so UI is non-orthogonal, it would be great if we can follow same UI structure for both score and review report which also reduce the DRY problems. There is no functionality for user to search between reviews of particular project, such a functionality will help user to search through all reviews for specific problem they are trying to focus on.&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The project requires completion of the following tasks:&lt;br /&gt;
====Task-1 (Update review report view in Instructor's view)====&lt;br /&gt;
* A single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each team received, sorted by team; and reviews that each student did, sorted by student)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For student view the UI is consistent in displaying reviews they have done and reviews they have received but for instructor's view the review report follows different UI and have different code. To make the UI consistent we have decided to choose the UI design of student view as the base and modify the UI design for review report in instructor's view. This will allow us to use the same code in both views, thereby following DRY principle.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:review_report.png]] &lt;br /&gt;
&lt;br /&gt;
Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:review-report-changed.png]]&lt;br /&gt;
&lt;br /&gt;
Implementation:&lt;br /&gt;
&lt;br /&gt;
Review report view is rendered in app/views/popup/team_users_popup.html.haml. In this view, we populate table by iterating over each question under each round. While same approach was used previously but here we replace each row by a predefined format used for rendering question similar to student view.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot;}&lt;br /&gt;
        %tr&lt;br /&gt;
          %th{:align =&amp;gt; &amp;quot;left&amp;quot;, :width =&amp;gt; &amp;quot;50%&amp;quot;} Question&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;5%&amp;quot;} Score&lt;br /&gt;
          %th{:width =&amp;gt; &amp;quot;45%&amp;quot;} Comments&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          %tr&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = Question.find(s.question_id).txt&lt;br /&gt;
            - if Question.find(s.question_id).is_a?(ScoredQuestion)&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
                \/#{instance_variable_get('@max_score_round_' + round.to_s)}&lt;br /&gt;
            - else&lt;br /&gt;
              %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
                = s.answer&lt;br /&gt;
            %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
              = s.comments&lt;br /&gt;
        %tr&lt;br /&gt;
          %th Reviewer Score (Σ weighted score/Σ weighted available score)&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;center&amp;quot;}&lt;br /&gt;
            = instance_variable_get('@sum_round_' + round.to_s)&lt;br /&gt;
            \/#{instance_variable_get('@total_possible_round_' + round.to_s)}&lt;br /&gt;
          %td{:align =&amp;gt; &amp;quot;left&amp;quot;}&lt;br /&gt;
            \= #{instance_variable_get('@total_percentage_round_' + round.to_s)}&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We replace the above code by code below, here in each row we invoke view_completed_question method defined in Criterion.rb for scored questions which insert the html code to render question,score,comments.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      %table{:border =&amp;gt; &amp;quot;1px solid #ccc&amp;quot; ,:class =&amp;gt; &amp;quot;table table-bordered&amp;quot;}&lt;br /&gt;
        - counter = 0&lt;br /&gt;
        - instance_variable_get('@scores_round_' + round.to_s).each do |s|&lt;br /&gt;
          - counter += 1&lt;br /&gt;
          - row_class = counter.even? ? &amp;quot;info&amp;quot; : &amp;quot;warning&amp;quot;&lt;br /&gt;
          - question = Question.find(s.question_id)&lt;br /&gt;
          %tr{:class =&amp;gt; row_class}&lt;br /&gt;
            %td&lt;br /&gt;
              = question.becomes(Criterion).view_completed_question(counter,s,instance_variable_get('@max_score_round_' + round.to_s))&lt;br /&gt;
        %tr&lt;br /&gt;
          %td{:style =&amp;gt; &amp;quot;font-weight:bold&amp;quot;}&lt;br /&gt;
            = 'Reviewer Score (Σ weighted score/Σ weighted available score) = '+ instance_variable_get('@sum_round_' + round.to_s).to_s |&lt;br /&gt;
            \/ #{instance_variable_get('@total_possible_round_' + round.to_s)} (#{instance_variable_get('@total_percentage_round_' + round.to_s)}%)&lt;br /&gt;
      %table&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-2 (Button to show/hide all the reviews)====&lt;br /&gt;
* Add button/link to hide and expand all the reviews for a Round.&lt;br /&gt;
&lt;br /&gt;
In student view,for a particular assignment, the UI has &amp;lt;code&amp;gt;show review&amp;lt;/code&amp;gt; button for each review in a round. Adding a single button will help student view all the review of a round with single click.&lt;br /&gt;
&lt;br /&gt;
Previous View:&lt;br /&gt;
&lt;br /&gt;
[[File:P11.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Updated View:&lt;br /&gt;
&lt;br /&gt;
[[File:Update2.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Review view is rendered in app/views/grades/_reviews.html.erb. In this view, we added &amp;lt;code&amp;gt;show all reviews&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hide all reviews&amp;lt;/code&amp;gt; buttons which when clicked call &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function and displays all the reviews of a round.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundshow_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','show');return false;&amp;quot;&amp;gt;show all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#&amp;quot; name=&amp;lt;%=&amp;quot;roundhide_&amp;quot; + round.to_s + &amp;quot;Link&amp;quot; %&amp;gt; onClick=&amp;quot;toggleAllElement('&amp;lt;%= str %&amp;gt;','hide');return false;&amp;quot;&amp;gt;hide all reviews&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; We added &amp;lt;code&amp;gt;toggleAllElemnet&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js which toggles all the review of a round using existing &amp;lt;code&amp;gt;toggleElement&amp;lt;/code&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function toggleAllElement(elementIdList, mode=''){&lt;br /&gt;
    console.log(elementIdList)&lt;br /&gt;
    var res = elementIdList.split(&amp;quot;,&amp;quot;);&lt;br /&gt;
    var childText = 'review';&lt;br /&gt;
&lt;br /&gt;
    for (var y = 0; y &amp;lt; res.length - 1; y++) {&lt;br /&gt;
        toggleElement(res[y], childText, mode);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-3(Create a tabbed view for stats, reviews and heatmap)====&lt;br /&gt;
* Create a tabbed view for each review view type : Statistic, Reviews and Alternate Views tabs.&lt;br /&gt;
&lt;br /&gt;
Initially I weighed using TabsOnRails or Tabulous gems to create the tabs for this project but after doing some research these gems did not allow me to create tabs dynamically so Jquery UI was used to create the tabs. This was a plus since we did not need to install a new gem to the project. The review report will need to be modified to have the addition of the Statistic, Reviews and Alternate Views tabs at the top of the page. It will default to the Statistics tab which should look something like: &lt;br /&gt;
&lt;br /&gt;
[[File:tabStats.png]]&lt;br /&gt;
&lt;br /&gt;
And the Reviews tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:tabReviews.png]]&lt;br /&gt;
&lt;br /&gt;
The Alternate View tab should produce a view like: &lt;br /&gt;
&lt;br /&gt;
[[File:tabAlt.png]]&lt;br /&gt;
&lt;br /&gt;
=====Task 3 Implementation=====&lt;br /&gt;
&lt;br /&gt;
To create the tabs on the view_my_scores view we used the following Jquery code: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;tabs&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-1&amp;quot;&amp;gt;Stats&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-2&amp;quot;&amp;gt;Reviews&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-3&amp;quot;&amp;gt;Alternate View&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;tabs-1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;TABLE class=&amp;quot;grades&amp;quot; &amp;gt;&lt;br /&gt;
      &amp;lt;%= render :partial =&amp;gt; 'grades/participant_charts', :locals =&amp;gt; {:prefix =&amp;gt; nil} %&amp;gt;&lt;br /&gt;
      &amp;lt;%= render :partial =&amp;gt; 'grades/participant_title', :locals =&amp;gt; {:prefix =&amp;gt; nil} %&amp;gt;&lt;br /&gt;
      &amp;lt;%= render :partial =&amp;gt; 'grades/participant', :locals =&amp;gt; {:prefix =&amp;gt; 'user',&lt;br /&gt;
                                                               :team =&amp;gt; false,&lt;br /&gt;
                                                               :participant_id =&amp;gt; ptid = @participant.id,&lt;br /&gt;
                                                               :index =&amp;gt; 0,&lt;br /&gt;
                                                               :team_size =&amp;gt; 1,&lt;br /&gt;
                                                               :pscore =&amp;gt; @pscore} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
    &amp;lt;% case @assignment.reputation_algorithm %&amp;gt;&lt;br /&gt;
    &amp;lt;% when 'Hamer' %&amp;gt;&lt;br /&gt;
        &amp;lt;h3&amp;gt;Reputation&amp;lt;/h3&amp;gt;&lt;br /&gt;
        &amp;lt;p id = &amp;quot;reputation_score&amp;quot; class = &amp;lt;%= get_css_style_for_hamer_reputation(@participant.Hamer)%&amp;gt; style = &amp;quot;width:60px;&amp;quot;&amp;gt;&amp;lt;%= @participant.Hamer %&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;% when 'Lauw' %&amp;gt;&lt;br /&gt;
        &amp;lt;h3&amp;gt;Reputation&amp;lt;/h3&amp;gt;&lt;br /&gt;
        &amp;lt;p id = &amp;quot;reputation_score&amp;quot; class = &amp;lt;%= get_css_style_for_lauw_reputation(@participant.Lauw)%&amp;gt; style = &amp;quot;width:60px;&amp;quot;&amp;gt;&amp;lt;%= @participant.Lauw %&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;%end%&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;tabs-2&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;TABLE&amp;gt;&lt;br /&gt;
      &amp;lt;TR&amp;gt;&lt;br /&gt;
        &amp;lt;TD COLSPAN=&amp;quot;10&amp;quot;&amp;gt;&amp;lt;%= render :partial=&amp;gt;'grades/reviews', :locals =&amp;gt; {:prefix =&amp;gt; 'user', :participant =&amp;gt; @pscore[:participant], :rscore =&amp;gt; @pscore[:review]} %&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
      &amp;lt;/TR&amp;gt;&lt;br /&gt;
    &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;tabs-3&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;%= render &amp;quot;view_team&amp;quot;, :id =&amp;gt; params[:id] %&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    $(function() {&lt;br /&gt;
        $( &amp;quot;#tabs&amp;quot; ).tabs();&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Stats tab was easy since we just took what was already in that view and moved it to only be displayed under the first tab. &lt;br /&gt;
&lt;br /&gt;
The Review tab was created by pulling up the rendering of the review partial out of the participant partial. This just needed to point the local variables to variables that were in this View. &lt;br /&gt;
&lt;br /&gt;
The Alternate View tab was a bit tricky since it was it's on view (view_team). So what was done was creating a partial named _view_team and moving all of the code that was in that view the partial and rendering the partial in the view_team view. This allowed us to access this view from the view_team and view_my_score views simultaneously while using the same code base.&lt;br /&gt;
&lt;br /&gt;
We were going to add the sub tabs for the Reviewers but after implementing the &amp;quot;show all reviews&amp;quot; buttons those tabs became tricky and the page got really cluttered. So we decided that we could just keep the existing scores Review layout with the changes of toggling whether to hide or show the reviews.   &lt;br /&gt;
&lt;br /&gt;
=====Task 3 Testing=====&lt;br /&gt;
&lt;br /&gt;
To test this feature go to the view_my_scores page for the student where you should see the 3 tabs. &lt;br /&gt;
Make sure that each tab gives you a similar view as described above.&lt;br /&gt;
&lt;br /&gt;
====Task-4(Buttons to toggle questions/score/answers)====&lt;br /&gt;
* Make review feedback more readable by changing UI or background color.&lt;br /&gt;
* Option to toggle review question or score or  answers.&lt;br /&gt;
&lt;br /&gt;
This task is to make feedback response more readable or more focused for user to read. Instructor suggested this can be done by graying out the question or we can change the background of the response text. The existing review also has this behavior. We added toggle button to show/hide questions/score/answers for a review based on instructor suggestion.&lt;br /&gt;
&lt;br /&gt;
Previous View:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: Taskk44.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Update View:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: Updated4.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Implementation:&lt;br /&gt;
&amp;lt;p&amp;gt; The implementation of this functionality is similar to Task 2. A review is rendered in app/models/response.rb. We added &amp;lt;code&amp;gt;toggle questions,&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;toggle score and&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;toggle answers&amp;lt;/code&amp;gt; button in a review view, which when clicked calls &amp;lt;code&amp;gt;toggleAllElement&amp;lt;/code&amp;gt; function in app/assets/javascripts/tableactions.js that toggles respective view.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code+='&amp;lt;br&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;question_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_ques + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle questions&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;score_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_score + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle scores&amp;lt;/a&amp;gt;'&lt;br /&gt;
    code+='&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a href=&amp;quot;#&amp;quot; name= &amp;quot;answer_' + str + 'Link&amp;quot; onClick=&amp;quot;toggleAllElement(' + &amp;quot;'&amp;quot; + str_answer + &amp;quot;','review'&amp;quot; + ');return false;&amp;quot;&amp;gt;toggle answers&amp;lt;/a&amp;gt;'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task-5 (Change view in response controller, when clicked on review link)====&lt;br /&gt;
When scores are view in alternate view(Heat map) it displays score received for each review in tabular format when we click on any review hyperlink it invokes view method of response controller which render unnecessary elements like submission content, upload file button,etc along with review and feedback, instead it should just show review and feedback. So we created a new view to implement this functionality and removed other unrequired elements.&lt;br /&gt;
&lt;br /&gt;
Files updated: &lt;br /&gt;
&lt;br /&gt;
  app/controllers/response_controller.rb&lt;br /&gt;
  app/views/grades/_view_team.html.erb&lt;br /&gt;
  app/views/response/view_review.html.erb&lt;br /&gt;
  config/routes.rb&lt;br /&gt;
&lt;br /&gt;
We have selected the unrequired element in below mockup image. &lt;br /&gt;
                             &lt;br /&gt;
[[File:Review_view.png]]&lt;br /&gt;
&lt;br /&gt;
=====UI TEST=====&lt;br /&gt;
* Log-in as student.&lt;br /&gt;
* Go to particular assignment&lt;br /&gt;
* Select alternative view&lt;br /&gt;
* Click on any review hyperlink, to see reviews.&lt;br /&gt;
&lt;br /&gt;
====Task-6 (Optional if Task 2 is complete)====&lt;br /&gt;
* Add search box to search between reviews for particular string for a specific project(Student's view) or for specific user(Instructor's view).&lt;br /&gt;
This functionality will help user to readily access the required content within the reviews.&amp;lt;br /&amp;gt;&lt;br /&gt;
Below is the mock-up image of how functionality will look after implementations&lt;br /&gt;
&lt;br /&gt;
[[File:SearchFunctionality.png]]&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
* To Test UI for student View&lt;br /&gt;
** Log-in as Student.&lt;br /&gt;
** Go to Assignment&lt;br /&gt;
** Click Your scores&lt;br /&gt;
** Click show reviews&lt;br /&gt;
&lt;br /&gt;
* To Test UI for instructor View&lt;br /&gt;
** Log-in as Instructor.&lt;br /&gt;
** Go to Manage Assignments&lt;br /&gt;
** Click on review report of a particular assignment&lt;br /&gt;
** Click on any item in team reviewed tab, to see reviews.&lt;br /&gt;
&lt;br /&gt;
== Future Improvements ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hcao5</name></author>
	</entry>
</feed>