<?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=Cwang64</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=Cwang64"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Cwang64"/>
	<updated>2026-05-11T01:50:40Z</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=131228</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=131228"/>
		<updated>2019-12-11T23:28:27Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &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;
* 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>Cwang64</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=131227</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=131227"/>
		<updated>2019-12-11T23:27:51Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &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;
* 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;
Youtube:&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/yeAjjgaV10w&lt;/div&gt;</summary>
		<author><name>Cwang64</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=128550</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=128550"/>
		<updated>2019-11-11T07:13:51Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &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;
[[File:Use_Cases.jpg‎]]&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>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Use_Cases.jpg&amp;diff=128549</id>
		<title>File:Use Cases.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Use_Cases.jpg&amp;diff=128549"/>
		<updated>2019-11-11T07:13:10Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125684</id>
		<title>CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125684"/>
		<updated>2019-10-27T22:05:37Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
If an instructor or a TA wants to delete topics he has to delete one topic at a time and has to wait for the page to refresh and then (s)he can proceed to delete the next topic, topics can only be deleted one by one.&lt;br /&gt;
&lt;br /&gt;
===To fix the problem:===&lt;br /&gt;
1.There should be a checkbox column, along with other columns in “Topics” tab, where a user can select the topics (s)he wants to delete.&lt;br /&gt;
&lt;br /&gt;
2.There should be a delete button/link at the end of the topic table with the name “delete selected topics” to delete the selected topics after a confirmation, prompted post clicking the button/link.&lt;br /&gt;
&lt;br /&gt;
3.There should be a button/link alongside “delete selected topics” by the name “Select all” so that a user can select all and delete them in one go after clicking on “delete selected topics”.&lt;br /&gt;
&lt;br /&gt;
=='''Solution'''==&lt;br /&gt;
&lt;br /&gt;
===1.Modify view===&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add bottoms of 'Delete select topics' and 'Select all'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Delete select topics&amp;quot; onclick=&amp;quot;deleteTopics()&amp;quot; /&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;a id=&amp;quot;select all &amp;quot; onclick=&amp;quot;checkAll()&amp;quot;&amp;gt;Select all&amp;lt;/a&amp;gt; |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
&lt;br /&gt;
Add 'Select' header&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Select?&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
Add selected checkbox&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;query_mySelectBox&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===2.'Select All' function===&lt;br /&gt;
File: app/assets/javascripts/signup.js &lt;br /&gt;
&lt;br /&gt;
Select All function checks all checkbox of topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  function selectAll(source) {&lt;br /&gt;
      checkboxes = document.getElementsByName('mySelectBox');&lt;br /&gt;
      for (var i = 0, n = checkboxes.length; i &amp;lt; n; i++) {&lt;br /&gt;
          checkboxes[i].checked = source.checked;&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===3.'Delete' function===&lt;br /&gt;
File: app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
Define delete all and get selected topics methods.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # This deletes all selected topics&lt;br /&gt;
  def delete_all_selected_topics&lt;br /&gt;
    load_all_selected_topics&lt;br /&gt;
    @stopics.each(&amp;amp;:destroy)&lt;br /&gt;
    flash[:success] = &amp;quot;All selected topics have been deleted successfully.&amp;quot;&lt;br /&gt;
    respond_to do |format|&lt;br /&gt;
      format.html { redirect_to edit_assignment_path(params[:a_id]) + &amp;quot;#tabs-2&amp;quot; }&lt;br /&gt;
      format.js {}&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # This get all selected topics&lt;br /&gt;
  def load_all_selected_topics&lt;br /&gt;
    @stopics = SignUpTopic.where(assignment_id: params[:a_id], topic_identifier: params[:idents])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt; to&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot; id=&amp;quot;Table1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Delete function destroys all selected topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
  function deleteTopics() {&lt;br /&gt;
    var msg = 'Are you sure? It will destroy all selected topics';&lt;br /&gt;
    if (confirm(msg)) {&lt;br /&gt;
        var identifiers = []&lt;br /&gt;
        $(&amp;quot;#Table1 input[type=checkbox]:checked&amp;quot;).each(function() {&lt;br /&gt;
            var ient = $(this).closest('tr').find('#ident').text();&lt;br /&gt;
            identifiers.push(ient);&lt;br /&gt;
        });&lt;br /&gt;
        jQuery.ajax({&lt;br /&gt;
            url: '/sign_up_sheet/delete_all_selected_topics',&lt;br /&gt;
            method: 'POST',&lt;br /&gt;
            data: {&lt;br /&gt;
                idents: identifiers,&lt;br /&gt;
                a_id: &amp;lt;%= @assignment.id %&amp;gt;&lt;br /&gt;
            },&lt;br /&gt;
            success: function() {&lt;br /&gt;
                location.reload();&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    } else {&lt;br /&gt;
        window.location.href = '&amp;lt;%= edit_assignment_path(@assignment.id) + &amp;quot;#tabs-2&amp;quot; %&amp;gt;';&lt;br /&gt;
    }&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;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;td&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt; to&lt;br /&gt;
  &amp;lt;td id='ident'&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: config/routes.rb&lt;br /&gt;
&lt;br /&gt;
Add url.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  post :delete_all_selected_topics&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Result'''==&lt;br /&gt;
Before clicking 'Select all' bottom, there are checkboxes that could select each topic.&lt;br /&gt;
[[File:Before_select.png]]&lt;br /&gt;
After clicking 'Select all' bottom, all checkboxes are selected.&lt;br /&gt;
&lt;br /&gt;
[[File:After_select.png]]&lt;br /&gt;
After pushing 'Deleted selected topics', there's a confirmation alert. After clicking yes could delete all topics.&lt;br /&gt;
&lt;br /&gt;
[[File:Confirm_deletion.png]]&lt;br /&gt;
=='''Test'''==&lt;br /&gt;
File: spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
Select assignment  with id '834' and topic with id ['E1732'] as params. Post params to delete_all_selected_topics. Expect success flash with 'All selected topics have been deleted successfully.' and redirect to '/assignments/834/edit#tabs-2'.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#delete_all_selected_topics' do&lt;br /&gt;
    it 'delete_all_selected_topics and redirects to edit assignment page' do&lt;br /&gt;
      allow(SignUpTopic).to receive(:find).with(assignment_id: '834',topic_identifier: ['E1732']).and_return(topic)&lt;br /&gt;
      params = {assignment_id: 834, idents: ['E1732']}&lt;br /&gt;
      post :delete_all_selected_topics, params&lt;br /&gt;
      expect(flash[:success]).to eq('All selected topics have been deleted successfully.')&lt;br /&gt;
      expect(response).to redirect_to('/assignments/834/edit#tabs-2')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Confirm_deletion.png&amp;diff=125683</id>
		<title>File:Confirm deletion.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Confirm_deletion.png&amp;diff=125683"/>
		<updated>2019-10-27T22:03:57Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: uploaded a new version of &amp;amp;quot;File:Confirm deletion.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:After_select.png&amp;diff=125682</id>
		<title>File:After select.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:After_select.png&amp;diff=125682"/>
		<updated>2019-10-27T22:03:05Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: uploaded a new version of &amp;amp;quot;File:After select.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Before_select.png&amp;diff=125681</id>
		<title>File:Before select.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Before_select.png&amp;diff=125681"/>
		<updated>2019-10-27T22:02:36Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: uploaded a new version of &amp;amp;quot;File:Before select.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125680</id>
		<title>CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125680"/>
		<updated>2019-10-27T21:53:14Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
If an instructor or a TA wants to delete topics he has to delete one topic at a time and has to wait for the page to refresh and then (s)he can proceed to delete the next topic, topics can only be deleted one by one.&lt;br /&gt;
&lt;br /&gt;
===To fix the problem:===&lt;br /&gt;
1.There should be a checkbox column, along with other columns in “Topics” tab, where a user can select the topics (s)he wants to delete.&lt;br /&gt;
&lt;br /&gt;
2.There should be a delete button/link at the end of the topic table with the name “delete selected topics” to delete the selected topics after a confirmation, prompted post clicking the button/link.&lt;br /&gt;
&lt;br /&gt;
3.There should be a button/link alongside “delete selected topics” by the name “Select all” so that a user can select all and delete them in one go after clicking on “delete selected topics”.&lt;br /&gt;
&lt;br /&gt;
=='''Solution'''==&lt;br /&gt;
&lt;br /&gt;
===1.Modify view===&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add bottoms of 'Delete select topics' and 'Select all'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Delete select topics&amp;quot; onclick=&amp;quot;deleteTopics()&amp;quot; /&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;a id=&amp;quot;select all &amp;quot; onclick=&amp;quot;checkAll()&amp;quot;&amp;gt;Select all&amp;lt;/a&amp;gt; |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
&lt;br /&gt;
Add 'Select' header&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Select?&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
Add selected checkbox&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;query_mySelectBox&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===2.'Select All' function===&lt;br /&gt;
File: app/assets/javascripts/signup.js &lt;br /&gt;
&lt;br /&gt;
Select All function checks all checkbox of topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  function selectAll(source) {&lt;br /&gt;
      checkboxes = document.getElementsByName('mySelectBox');&lt;br /&gt;
      for (var i = 0, n = checkboxes.length; i &amp;lt; n; i++) {&lt;br /&gt;
          checkboxes[i].checked = source.checked;&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===3.'Delete' function===&lt;br /&gt;
File: app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
Define delete all and get selected topics methods.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # This deletes all selected topics&lt;br /&gt;
  def delete_all_selected_topics&lt;br /&gt;
    load_all_selected_topics&lt;br /&gt;
    @stopics.each(&amp;amp;:destroy)&lt;br /&gt;
    flash[:success] = &amp;quot;All selected topics have been deleted successfully.&amp;quot;&lt;br /&gt;
    respond_to do |format|&lt;br /&gt;
      format.html { redirect_to edit_assignment_path(params[:a_id]) + &amp;quot;#tabs-2&amp;quot; }&lt;br /&gt;
      format.js {}&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # This get all selected topics&lt;br /&gt;
  def load_all_selected_topics&lt;br /&gt;
    @stopics = SignUpTopic.where(assignment_id: params[:a_id], topic_identifier: params[:idents])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt; to&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot; id=&amp;quot;Table1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Delete function destroys all selected topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
  function deleteTopics() {&lt;br /&gt;
    var msg = 'Are you sure? It will destroy all selected topics';&lt;br /&gt;
    if (confirm(msg)) {&lt;br /&gt;
        var identifiers = []&lt;br /&gt;
        $(&amp;quot;#Table1 input[type=checkbox]:checked&amp;quot;).each(function() {&lt;br /&gt;
            var ient = $(this).closest('tr').find('#ident').text();&lt;br /&gt;
            identifiers.push(ient);&lt;br /&gt;
        });&lt;br /&gt;
        jQuery.ajax({&lt;br /&gt;
            url: '/sign_up_sheet/delete_all_selected_topics',&lt;br /&gt;
            method: 'POST',&lt;br /&gt;
            data: {&lt;br /&gt;
                idents: identifiers,&lt;br /&gt;
                a_id: &amp;lt;%= @assignment.id %&amp;gt;&lt;br /&gt;
            },&lt;br /&gt;
            success: function() {&lt;br /&gt;
                location.reload();&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    } else {&lt;br /&gt;
        window.location.href = '&amp;lt;%= edit_assignment_path(@assignment.id) + &amp;quot;#tabs-2&amp;quot; %&amp;gt;';&lt;br /&gt;
    }&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;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;td&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt; to&lt;br /&gt;
  &amp;lt;td id='ident'&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: config/routes.rb&lt;br /&gt;
&lt;br /&gt;
Add url.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  post :delete_all_selected_topics&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Result'''==&lt;br /&gt;
Before clicking 'Select all' bottom, there are checkboxes that could select each topic.&lt;br /&gt;
[[File:Before_select.png]]&lt;br /&gt;
After clicking 'Select all' bottom, all checkboxes are selected.&lt;br /&gt;
[[File:After_select.png]]&lt;br /&gt;
After pushing 'Deleted selected topics', there's a confirmation alert. After clicking yes could delete all topics.&lt;br /&gt;
[[File:Confirm_deletion.png]]&lt;br /&gt;
=='''Test'''==&lt;br /&gt;
File: spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
Select assignment  with id '834' and topic with id ['E1732'] as params. Post params to delete_all_selected_topics. Expect success flash with 'All selected topics have been deleted successfully.' and redirect to '/assignments/834/edit#tabs-2'.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#delete_all_selected_topics' do&lt;br /&gt;
    it 'delete_all_selected_topics and redirects to edit assignment page' do&lt;br /&gt;
      allow(SignUpTopic).to receive(:find).with(assignment_id: '834',topic_identifier: ['E1732']).and_return(topic)&lt;br /&gt;
      params = {assignment_id: 834, idents: ['E1732']}&lt;br /&gt;
      post :delete_all_selected_topics, params&lt;br /&gt;
      expect(flash[:success]).to eq('All selected topics have been deleted successfully.')&lt;br /&gt;
      expect(response).to redirect_to('/assignments/834/edit#tabs-2')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125679</id>
		<title>CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125679"/>
		<updated>2019-10-27T21:46:47Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
If an instructor or a TA wants to delete topics he has to delete one topic at a time and has to wait for the page to refresh and then (s)he can proceed to delete the next topic, topics can only be deleted one by one.&lt;br /&gt;
&lt;br /&gt;
===To fix the problem:===&lt;br /&gt;
1.There should be a checkbox column, along with other columns in “Topics” tab, where a user can select the topics (s)he wants to delete.&lt;br /&gt;
&lt;br /&gt;
2.There should be a delete button/link at the end of the topic table with the name “delete selected topics” to delete the selected topics after a confirmation, prompted post clicking the button/link.&lt;br /&gt;
&lt;br /&gt;
3.There should be a button/link alongside “delete selected topics” by the name “Select all” so that a user can select all and delete them in one go after clicking on “delete selected topics”.&lt;br /&gt;
&lt;br /&gt;
=='''Solution'''==&lt;br /&gt;
&lt;br /&gt;
===1.Modify view===&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add bottoms of 'Delete select topics' and 'Select all'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Delete select topics&amp;quot; onclick=&amp;quot;deleteTopics()&amp;quot; /&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;a id=&amp;quot;select all &amp;quot; onclick=&amp;quot;checkAll()&amp;quot;&amp;gt;Select all&amp;lt;/a&amp;gt; |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
&lt;br /&gt;
Add 'Select' header&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Select?&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
Add selected checkbox&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;query_mySelectBox&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===2.'Select All' function===&lt;br /&gt;
File: app/assets/javascripts/signup.js &lt;br /&gt;
&lt;br /&gt;
Select All function checks all checkbox of topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  function selectAll(source) {&lt;br /&gt;
      checkboxes = document.getElementsByName('mySelectBox');&lt;br /&gt;
      for (var i = 0, n = checkboxes.length; i &amp;lt; n; i++) {&lt;br /&gt;
          checkboxes[i].checked = source.checked;&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===3.'Delete' function===&lt;br /&gt;
File: app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
Define delete all and get selected topics methods.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # This deletes all selected topics&lt;br /&gt;
  def delete_all_selected_topics&lt;br /&gt;
    load_all_selected_topics&lt;br /&gt;
    @stopics.each(&amp;amp;:destroy)&lt;br /&gt;
    flash[:success] = &amp;quot;All selected topics have been deleted successfully.&amp;quot;&lt;br /&gt;
    respond_to do |format|&lt;br /&gt;
      format.html { redirect_to edit_assignment_path(params[:a_id]) + &amp;quot;#tabs-2&amp;quot; }&lt;br /&gt;
      format.js {}&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # This get all selected topics&lt;br /&gt;
  def load_all_selected_topics&lt;br /&gt;
    @stopics = SignUpTopic.where(assignment_id: params[:a_id], topic_identifier: params[:idents])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt; to&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot; id=&amp;quot;Table1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Delete function destroys all selected topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
  function deleteTopics() {&lt;br /&gt;
    var msg = 'Are you sure? It will destroy all selected topics';&lt;br /&gt;
    if (confirm(msg)) {&lt;br /&gt;
        var identifiers = []&lt;br /&gt;
        $(&amp;quot;#Table1 input[type=checkbox]:checked&amp;quot;).each(function() {&lt;br /&gt;
            var ient = $(this).closest('tr').find('#ident').text();&lt;br /&gt;
            identifiers.push(ient);&lt;br /&gt;
        });&lt;br /&gt;
        jQuery.ajax({&lt;br /&gt;
            url: '/sign_up_sheet/delete_all_selected_topics',&lt;br /&gt;
            method: 'POST',&lt;br /&gt;
            data: {&lt;br /&gt;
                idents: identifiers,&lt;br /&gt;
                a_id: &amp;lt;%= @assignment.id %&amp;gt;&lt;br /&gt;
            },&lt;br /&gt;
            success: function() {&lt;br /&gt;
                location.reload();&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    } else {&lt;br /&gt;
        window.location.href = '&amp;lt;%= edit_assignment_path(@assignment.id) + &amp;quot;#tabs-2&amp;quot; %&amp;gt;';&lt;br /&gt;
    }&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;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;td&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt; to&lt;br /&gt;
  &amp;lt;td id='ident'&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: config/routes.rb&lt;br /&gt;
&lt;br /&gt;
Add url.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  post :delete_all_selected_topics&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Result'''==&lt;br /&gt;
[[File:Before_select.png]]&lt;br /&gt;
[[File:After_select.png]]&lt;br /&gt;
[[File:Confirm_deletion.png]]&lt;br /&gt;
=='''Test'''==&lt;br /&gt;
File: spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
Select assignment  with id '834' and topic with id ['E1732'] as params. Post params to delete_all_selected_topics. Expect success flash with 'All selected topics have been deleted successfully.' and redirect to '/assignments/834/edit#tabs-2'.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#delete_all_selected_topics' do&lt;br /&gt;
    it 'delete_all_selected_topics and redirects to edit assignment page' do&lt;br /&gt;
      allow(SignUpTopic).to receive(:find).with(assignment_id: '834',topic_identifier: ['E1732']).and_return(topic)&lt;br /&gt;
      params = {assignment_id: 834, idents: ['E1732']}&lt;br /&gt;
      post :delete_all_selected_topics, params&lt;br /&gt;
      expect(flash[:success]).to eq('All selected topics have been deleted successfully.')&lt;br /&gt;
      expect(response).to redirect_to('/assignments/834/edit#tabs-2')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Confirm_deletion.png&amp;diff=125678</id>
		<title>File:Confirm deletion.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Confirm_deletion.png&amp;diff=125678"/>
		<updated>2019-10-27T21:46:42Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: uploaded a new version of &amp;amp;quot;File:Confirm deletion.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:After_select.png&amp;diff=125677</id>
		<title>File:After select.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:After_select.png&amp;diff=125677"/>
		<updated>2019-10-27T21:46:23Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: uploaded a new version of &amp;amp;quot;File:After select.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Before_select.png&amp;diff=125676</id>
		<title>File:Before select.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Before_select.png&amp;diff=125676"/>
		<updated>2019-10-27T21:46:00Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: uploaded a new version of &amp;amp;quot;File:Before select.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Confirm_deletion.png&amp;diff=125675</id>
		<title>File:Confirm deletion.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Confirm_deletion.png&amp;diff=125675"/>
		<updated>2019-10-27T21:39:01Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:After_select.png&amp;diff=125673</id>
		<title>File:After select.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:After_select.png&amp;diff=125673"/>
		<updated>2019-10-27T21:38:13Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Before_select.png&amp;diff=125672</id>
		<title>File:Before select.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Before_select.png&amp;diff=125672"/>
		<updated>2019-10-27T21:35:30Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: uploaded a new version of &amp;amp;quot;File:Before select.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Before_select.png&amp;diff=125671</id>
		<title>File:Before select.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Before_select.png&amp;diff=125671"/>
		<updated>2019-10-27T21:23:21Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125670</id>
		<title>CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125670"/>
		<updated>2019-10-27T21:20:29Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
If an instructor or a TA wants to delete topics he has to delete one topic at a time and has to wait for the page to refresh and then (s)he can proceed to delete the next topic, topics can only be deleted one by one.&lt;br /&gt;
&lt;br /&gt;
===To fix the problem:===&lt;br /&gt;
1.There should be a checkbox column, along with other columns in “Topics” tab, where a user can select the topics (s)he wants to delete.&lt;br /&gt;
&lt;br /&gt;
2.There should be a delete button/link at the end of the topic table with the name “delete selected topics” to delete the selected topics after a confirmation, prompted post clicking the button/link.&lt;br /&gt;
&lt;br /&gt;
3.There should be a button/link alongside “delete selected topics” by the name “Select all” so that a user can select all and delete them in one go after clicking on “delete selected topics”.&lt;br /&gt;
&lt;br /&gt;
=='''Solution'''==&lt;br /&gt;
&lt;br /&gt;
===1.Modify view===&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add bottoms of 'Delete select topics' and 'Select all'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Delete select topics&amp;quot; onclick=&amp;quot;deleteTopics()&amp;quot; /&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;a id=&amp;quot;select all &amp;quot; onclick=&amp;quot;checkAll()&amp;quot;&amp;gt;Select all&amp;lt;/a&amp;gt; |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
&lt;br /&gt;
Add 'Select' header&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Select?&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
Add selected checkbox&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;query_mySelectBox&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===2.'Select All' function===&lt;br /&gt;
File: app/assets/javascripts/signup.js &lt;br /&gt;
&lt;br /&gt;
Select All function checks all checkbox of topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  function selectAll(source) {&lt;br /&gt;
      checkboxes = document.getElementsByName('mySelectBox');&lt;br /&gt;
      for (var i = 0, n = checkboxes.length; i &amp;lt; n; i++) {&lt;br /&gt;
          checkboxes[i].checked = source.checked;&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===3.'Delete' function===&lt;br /&gt;
File: app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
Define delete all and get selected topics methods.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # This deletes all selected topics&lt;br /&gt;
  def delete_all_selected_topics&lt;br /&gt;
    load_all_selected_topics&lt;br /&gt;
    @stopics.each(&amp;amp;:destroy)&lt;br /&gt;
    flash[:success] = &amp;quot;All selected topics have been deleted successfully.&amp;quot;&lt;br /&gt;
    respond_to do |format|&lt;br /&gt;
      format.html { redirect_to edit_assignment_path(params[:a_id]) + &amp;quot;#tabs-2&amp;quot; }&lt;br /&gt;
      format.js {}&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # This get all selected topics&lt;br /&gt;
  def load_all_selected_topics&lt;br /&gt;
    @stopics = SignUpTopic.where(assignment_id: params[:a_id], topic_identifier: params[:idents])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt; to&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot; id=&amp;quot;Table1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Delete function destroys all selected topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
  function deleteTopics() {&lt;br /&gt;
    var msg = 'Are you sure? It will destroy all selected topics';&lt;br /&gt;
    if (confirm(msg)) {&lt;br /&gt;
        var identifiers = []&lt;br /&gt;
        $(&amp;quot;#Table1 input[type=checkbox]:checked&amp;quot;).each(function() {&lt;br /&gt;
            var ient = $(this).closest('tr').find('#ident').text();&lt;br /&gt;
            identifiers.push(ient);&lt;br /&gt;
        });&lt;br /&gt;
        jQuery.ajax({&lt;br /&gt;
            url: '/sign_up_sheet/delete_all_selected_topics',&lt;br /&gt;
            method: 'POST',&lt;br /&gt;
            data: {&lt;br /&gt;
                idents: identifiers,&lt;br /&gt;
                a_id: &amp;lt;%= @assignment.id %&amp;gt;&lt;br /&gt;
            },&lt;br /&gt;
            success: function() {&lt;br /&gt;
                location.reload();&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    } else {&lt;br /&gt;
        window.location.href = '&amp;lt;%= edit_assignment_path(@assignment.id) + &amp;quot;#tabs-2&amp;quot; %&amp;gt;';&lt;br /&gt;
    }&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;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;td&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt; to&lt;br /&gt;
  &amp;lt;td id='ident'&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: config/routes.rb&lt;br /&gt;
&lt;br /&gt;
Add url.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  post :delete_all_selected_topics&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Result'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Test'''==&lt;br /&gt;
File: spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
Select assignment  with id '834' and topic with id ['E1732'] as params. Post params to delete_all_selected_topics. Expect success flash with 'All selected topics have been deleted successfully.' and redirect to '/assignments/834/edit#tabs-2'.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#delete_all_selected_topics' do&lt;br /&gt;
    it 'delete_all_selected_topics and redirects to edit assignment page' do&lt;br /&gt;
      allow(SignUpTopic).to receive(:find).with(assignment_id: '834',topic_identifier: ['E1732']).and_return(topic)&lt;br /&gt;
      params = {assignment_id: 834, idents: ['E1732']}&lt;br /&gt;
      post :delete_all_selected_topics, params&lt;br /&gt;
      expect(flash[:success]).to eq('All selected topics have been deleted successfully.')&lt;br /&gt;
      expect(response).to redirect_to('/assignments/834/edit#tabs-2')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125667</id>
		<title>CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125667"/>
		<updated>2019-10-27T20:45:25Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
If an instructor or a TA wants to delete topics he has to delete one topic at a time and has to wait for the page to refresh and then (s)he can proceed to delete the next topic, topics can only be deleted one by one.&lt;br /&gt;
&lt;br /&gt;
===To fix the problem:===&lt;br /&gt;
1.There should be a checkbox column, along with other columns in “Topics” tab, where a user can select the topics (s)he wants to delete.&lt;br /&gt;
&lt;br /&gt;
2.There should be a delete button/link at the end of the topic table with the name “delete selected topics” to delete the selected topics after a confirmation, prompted post clicking the button/link.&lt;br /&gt;
&lt;br /&gt;
3.There should be a button/link alongside “delete selected topics” by the name “Select all” so that a user can select all and delete them in one go after clicking on “delete selected topics”.&lt;br /&gt;
&lt;br /&gt;
=='''Solution'''==&lt;br /&gt;
&lt;br /&gt;
===1.Modify view===&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add bottoms of 'Delete select topics' and 'Select all'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Delete select topics&amp;quot; onclick=&amp;quot;deleteTopics()&amp;quot; /&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;a id=&amp;quot;select all &amp;quot; onclick=&amp;quot;checkAll()&amp;quot;&amp;gt;Select all&amp;lt;/a&amp;gt; |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
&lt;br /&gt;
Add 'Select' header&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Select?&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
Add selected checkbox&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;query_mySelectBox&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===2.'Select All' function===&lt;br /&gt;
File: app/assets/javascripts/signup.js &lt;br /&gt;
&lt;br /&gt;
Select All function checks all checkbox of topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  function selectAll(source) {&lt;br /&gt;
      checkboxes = document.getElementsByName('mySelectBox');&lt;br /&gt;
      for (var i = 0, n = checkboxes.length; i &amp;lt; n; i++) {&lt;br /&gt;
          checkboxes[i].checked = source.checked;&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===3.'Delete' function===&lt;br /&gt;
File: app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
Define delete all and get selected topics methods.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # This deletes all selected topics&lt;br /&gt;
  def delete_all_selected_topics&lt;br /&gt;
    load_all_selected_topics&lt;br /&gt;
    @stopics.each(&amp;amp;:destroy)&lt;br /&gt;
    flash[:success] = &amp;quot;All selected topics have been deleted successfully.&amp;quot;&lt;br /&gt;
    respond_to do |format|&lt;br /&gt;
      format.html { redirect_to edit_assignment_path(params[:a_id]) + &amp;quot;#tabs-2&amp;quot; }&lt;br /&gt;
      format.js {}&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # This get all selected topics&lt;br /&gt;
  def load_all_selected_topics&lt;br /&gt;
    @stopics = SignUpTopic.where(assignment_id: params[:a_id], topic_identifier: params[:idents])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt; to&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot; id=&amp;quot;Table1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Delete function destroys all selected topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
  function deleteTopics() {&lt;br /&gt;
    var msg = 'Are you sure? It will destroy all selected topics';&lt;br /&gt;
    if (confirm(msg)) {&lt;br /&gt;
        var identifiers = []&lt;br /&gt;
        $(&amp;quot;#Table1 input[type=checkbox]:checked&amp;quot;).each(function() {&lt;br /&gt;
            var ient = $(this).closest('tr').find('#ident').text();&lt;br /&gt;
            identifiers.push(ient);&lt;br /&gt;
        });&lt;br /&gt;
        jQuery.ajax({&lt;br /&gt;
            url: '/sign_up_sheet/delete_all_selected_topics',&lt;br /&gt;
            method: 'POST',&lt;br /&gt;
            data: {&lt;br /&gt;
                idents: identifiers,&lt;br /&gt;
                a_id: &amp;lt;%= @assignment.id %&amp;gt;&lt;br /&gt;
            },&lt;br /&gt;
            success: function() {&lt;br /&gt;
                location.reload();&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    } else {&lt;br /&gt;
        window.location.href = '&amp;lt;%= edit_assignment_path(@assignment.id) + &amp;quot;#tabs-2&amp;quot; %&amp;gt;';&lt;br /&gt;
    }&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;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;td&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt; to&lt;br /&gt;
  &amp;lt;td id='ident'&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: config/routes.rb&lt;br /&gt;
&lt;br /&gt;
Add url.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  post :delete_all_selected_topics&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Test'''==&lt;br /&gt;
File: spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
Select assignment  with id '834' and topic with id ['E1732'] as params. Post params to delete_all_selected_topics. Expect success flash with 'All selected topics have been deleted successfully.' and redirect to '/assignments/834/edit#tabs-2'.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#delete_all_selected_topics' do&lt;br /&gt;
    it 'delete_all_selected_topics and redirects to edit assignment page' do&lt;br /&gt;
      allow(SignUpTopic).to receive(:find).with(assignment_id: '834',topic_identifier: ['E1732']).and_return(topic)&lt;br /&gt;
      params = {assignment_id: 834, idents: ['E1732']}&lt;br /&gt;
      post :delete_all_selected_topics, params&lt;br /&gt;
      expect(flash[:success]).to eq('All selected topics have been deleted successfully.')&lt;br /&gt;
      expect(response).to redirect_to('/assignments/834/edit#tabs-2')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125648</id>
		<title>CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125648"/>
		<updated>2019-10-27T19:57:46Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
If an instructor or a TA wants to delete topics he has to delete one topic at a time and has to wait for the page to refresh and then (s)he can proceed to delete the next topic, topics can only be deleted one by one.&lt;br /&gt;
&lt;br /&gt;
===To fix the problem:===&lt;br /&gt;
1.There should be a checkbox column, along with other columns in “Topics” tab, where a user can select the topics (s)he wants to delete.&lt;br /&gt;
&lt;br /&gt;
2.There should be a delete button/link at the end of the topic table with the name “delete selected topics” to delete the selected topics after a confirmation, prompted post clicking the button/link.&lt;br /&gt;
&lt;br /&gt;
3.There should be a button/link alongside “delete selected topics” by the name “Select all” so that a user can select all and delete them in one go after clicking on “delete selected topics”.&lt;br /&gt;
&lt;br /&gt;
=='''Solution'''==&lt;br /&gt;
&lt;br /&gt;
===1.Modify view===&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add bottoms of 'Delete select topics' and 'Select all'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Delete select topics&amp;quot; onclick=&amp;quot;deleteTopics()&amp;quot; /&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;a id=&amp;quot;select all &amp;quot; onclick=&amp;quot;checkAll()&amp;quot;&amp;gt;Select all&amp;lt;/a&amp;gt; |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
&lt;br /&gt;
Add 'Select' header&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Select?&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
Add selected checkbox&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;query_mySelectBox&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===2.'Select All' function===&lt;br /&gt;
File: app/assets/javascripts/signup.js &lt;br /&gt;
&lt;br /&gt;
Select All function checks all checkbox of topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  function selectAll(source) {&lt;br /&gt;
      checkboxes = document.getElementsByName('mySelectBox');&lt;br /&gt;
      for (var i = 0, n = checkboxes.length; i &amp;lt; n; i++) {&lt;br /&gt;
          checkboxes[i].checked = source.checked;&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===3.'Delete' function===&lt;br /&gt;
File: app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
Define delete all and get selected topics methods.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # This deletes all selected topics&lt;br /&gt;
  def delete_all_selected_topics&lt;br /&gt;
    load_all_selected_topics&lt;br /&gt;
    @stopics.each(&amp;amp;:destroy)&lt;br /&gt;
    flash[:success] = &amp;quot;All selected topics have been deleted successfully.&amp;quot;&lt;br /&gt;
    respond_to do |format|&lt;br /&gt;
      format.html { redirect_to edit_assignment_path(params[:a_id]) + &amp;quot;#tabs-2&amp;quot; }&lt;br /&gt;
      format.js {}&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # This get all selected topics&lt;br /&gt;
  def load_all_selected_topics&lt;br /&gt;
    @stopics = SignUpTopic.where(assignment_id: params[:a_id], topic_identifier: params[:idents])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt; to&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot; id=&amp;quot;Table1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Delete function destroys all selected topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
  function deleteTopics() {&lt;br /&gt;
    var msg = 'Are you sure? It will destroy all selected topics';&lt;br /&gt;
    if (confirm(msg)) {&lt;br /&gt;
        var identifiers = []&lt;br /&gt;
        $(&amp;quot;#Table1 input[type=checkbox]:checked&amp;quot;).each(function() {&lt;br /&gt;
            var ient = $(this).closest('tr').find('#ident').text();&lt;br /&gt;
            identifiers.push(ient);&lt;br /&gt;
        });&lt;br /&gt;
        jQuery.ajax({&lt;br /&gt;
            url: '/sign_up_sheet/delete_all_selected_topics',&lt;br /&gt;
            method: 'POST',&lt;br /&gt;
            data: {&lt;br /&gt;
                idents: identifiers,&lt;br /&gt;
                a_id: &amp;lt;%= @assignment.id %&amp;gt;&lt;br /&gt;
            },&lt;br /&gt;
            success: function() {&lt;br /&gt;
                location.reload();&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    } else {&lt;br /&gt;
        window.location.href = '&amp;lt;%= edit_assignment_path(@assignment.id) + &amp;quot;#tabs-2&amp;quot; %&amp;gt;';&lt;br /&gt;
    }&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;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;td&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt; to&lt;br /&gt;
  &amp;lt;td id='ident'&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: config/routes.rb&lt;br /&gt;
&lt;br /&gt;
Add url.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  post :delete_all_selected_topics&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Test'''==&lt;br /&gt;
File: spec/controllers/sign_up_sheet_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#delete_all_selected_topics' do&lt;br /&gt;
    it 'delete_all_selected_topics and redirects to edit assignment page' do&lt;br /&gt;
      allow(SignUpTopic).to receive(:find).with(assignment_id: '834',topic_identifier: ['E1732']).and_return(topic)&lt;br /&gt;
      params = {assignment_id: 834, idents: ['E1732']}&lt;br /&gt;
      post :delete_all_selected_topics, params&lt;br /&gt;
      expect(flash[:success]).to eq('All selected topics have been deleted successfully.')&lt;br /&gt;
      expect(response).to redirect_to('/assignments/834/edit#tabs-2')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=125561</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=125561"/>
		<updated>2019-10-27T07:42:47Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &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 - 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 - 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 - E1951. Remove multiple topics at a time]]&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Talk:CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125560</id>
		<title>Talk:CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Talk:CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125560"/>
		<updated>2019-10-27T07:41:43Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125559</id>
		<title>CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125559"/>
		<updated>2019-10-27T07:41:32Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: Created page with &amp;quot;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).  =='''Introduction'''== The Expertiza project is software to create reusable learn...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
If an instructor or a TA wants to delete topics he has to delete one topic at a time and has to wait for the page to refresh and then (s)he can proceed to delete the next topic, topics can only be deleted one by one.&lt;br /&gt;
&lt;br /&gt;
===To fix the problem:===&lt;br /&gt;
1.There should be a checkbox column, along with other columns in “Topics” tab, where a user can select the topics (s)he wants to delete.&lt;br /&gt;
&lt;br /&gt;
2.There should be a delete button/link at the end of the topic table with the name “delete selected topics” to delete the selected topics after a confirmation, prompted post clicking the button/link.&lt;br /&gt;
&lt;br /&gt;
3.There should be a button/link alongside “delete selected topics” by the name “Select all” so that a user can select all and delete them in one go after clicking on “delete selected topics”.&lt;br /&gt;
&lt;br /&gt;
=='''Solution'''==&lt;br /&gt;
&lt;br /&gt;
===1.Modify view===&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add bottoms of 'Delete select topics' and 'Select all'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Delete select topics&amp;quot; onclick=&amp;quot;deleteTopics()&amp;quot; /&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;a id=&amp;quot;select all &amp;quot; onclick=&amp;quot;checkAll()&amp;quot;&amp;gt;Select all&amp;lt;/a&amp;gt; |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
&lt;br /&gt;
Add 'Select' header&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Select?&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
Add selected checkbox&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;query_mySelectBox&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===2.'Select All' function===&lt;br /&gt;
File: app/assets/javascripts/signup.js &lt;br /&gt;
&lt;br /&gt;
Select All function checks all checkbox of topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  function selectAll(source) {&lt;br /&gt;
      checkboxes = document.getElementsByName('mySelectBox');&lt;br /&gt;
      for (var i = 0, n = checkboxes.length; i &amp;lt; n; i++) {&lt;br /&gt;
          checkboxes[i].checked = source.checked;&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===3.'Delete' function===&lt;br /&gt;
File: app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
Define delete all and get selected topics methods.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # This deletes all selected topics&lt;br /&gt;
  def delete_all_selected_topics&lt;br /&gt;
    load_all_selected_topics&lt;br /&gt;
    @stopics.each(&amp;amp;:destroy)&lt;br /&gt;
    flash[:success] = &amp;quot;All selected topics have been deleted successfully.&amp;quot;&lt;br /&gt;
    respond_to do |format|&lt;br /&gt;
      format.html { redirect_to edit_assignment_path(params[:a_id]) + &amp;quot;#tabs-2&amp;quot; }&lt;br /&gt;
      format.js {}&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # This get all selected topics&lt;br /&gt;
  def load_all_selected_topics&lt;br /&gt;
    @stopics = SignUpTopic.where(assignment_id: params[:a_id], topic_identifier: params[:idents])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt; to&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot; id=&amp;quot;Table1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Delete function destroys all selected topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
  function deleteTopics() {&lt;br /&gt;
    var msg = 'Are you sure? It will destroy all selected topics';&lt;br /&gt;
    if (confirm(msg)) {&lt;br /&gt;
        var identifiers = []&lt;br /&gt;
        $(&amp;quot;#Table1 input[type=checkbox]:checked&amp;quot;).each(function() {&lt;br /&gt;
            var ient = $(this).closest('tr').find('#ident').text();&lt;br /&gt;
            identifiers.push(ient);&lt;br /&gt;
        });&lt;br /&gt;
        jQuery.ajax({&lt;br /&gt;
            url: '/sign_up_sheet/delete_all_selected_topics',&lt;br /&gt;
            method: 'POST',&lt;br /&gt;
            data: {&lt;br /&gt;
                idents: identifiers,&lt;br /&gt;
                a_id: &amp;lt;%= @assignment.id %&amp;gt;&lt;br /&gt;
            },&lt;br /&gt;
            success: function() {&lt;br /&gt;
                location.reload();&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    } else {&lt;br /&gt;
        window.location.href = '&amp;lt;%= edit_assignment_path(@assignment.id) + &amp;quot;#tabs-2&amp;quot; %&amp;gt;';&lt;br /&gt;
    }&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;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;td&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt; to&lt;br /&gt;
  &amp;lt;td id='ident'&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: config/routes.rb&lt;br /&gt;
&lt;br /&gt;
Add url.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  post :delete_all_selected_topics&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Test'''==&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Talk:CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125558</id>
		<title>Talk:CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Talk:CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125558"/>
		<updated>2019-10-27T07:37:39Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
If an instructor or a TA wants to delete topics he has to delete one topic at a time and has to wait for the page to refresh and then (s)he can proceed to delete the next topic, topics can only be deleted one by one.&lt;br /&gt;
&lt;br /&gt;
===To fix the problem:===&lt;br /&gt;
1.There should be a checkbox column, along with other columns in “Topics” tab, where a user can select the topics (s)he wants to delete.&lt;br /&gt;
&lt;br /&gt;
2.There should be a delete button/link at the end of the topic table with the name “delete selected topics” to delete the selected topics after a confirmation, prompted post clicking the button/link.&lt;br /&gt;
&lt;br /&gt;
3.There should be a button/link alongside “delete selected topics” by the name “Select all” so that a user can select all and delete them in one go after clicking on “delete selected topics”.&lt;br /&gt;
&lt;br /&gt;
=='''Solution'''==&lt;br /&gt;
&lt;br /&gt;
===1.Modify view===&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add bottoms of 'Delete select topics' and 'Select all'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Delete select topics&amp;quot; onclick=&amp;quot;deleteTopics()&amp;quot; /&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;a id=&amp;quot;select all &amp;quot; onclick=&amp;quot;checkAll()&amp;quot;&amp;gt;Select all&amp;lt;/a&amp;gt; |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
&lt;br /&gt;
Add 'Select' header&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Select?&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
Add selected checkbox&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;query_mySelectBox&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===2.'Select All' function===&lt;br /&gt;
File: app/assets/javascripts/signup.js &lt;br /&gt;
&lt;br /&gt;
Select All function checks all checkbox of topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  function selectAll(source) {&lt;br /&gt;
      checkboxes = document.getElementsByName('mySelectBox');&lt;br /&gt;
      for (var i = 0, n = checkboxes.length; i &amp;lt; n; i++) {&lt;br /&gt;
          checkboxes[i].checked = source.checked;&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===3.'Delete' function===&lt;br /&gt;
File: app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
Define delete all and get selected topics methods.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # This deletes all selected topics&lt;br /&gt;
  def delete_all_selected_topics&lt;br /&gt;
    load_all_selected_topics&lt;br /&gt;
    @stopics.each(&amp;amp;:destroy)&lt;br /&gt;
    flash[:success] = &amp;quot;All selected topics have been deleted successfully.&amp;quot;&lt;br /&gt;
    respond_to do |format|&lt;br /&gt;
      format.html { redirect_to edit_assignment_path(params[:a_id]) + &amp;quot;#tabs-2&amp;quot; }&lt;br /&gt;
      format.js {}&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # This get all selected topics&lt;br /&gt;
  def load_all_selected_topics&lt;br /&gt;
    @stopics = SignUpTopic.where(assignment_id: params[:a_id], topic_identifier: params[:idents])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt; to&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot; id=&amp;quot;Table1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Delete function destroys all selected topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
  function deleteTopics() {&lt;br /&gt;
    var msg = 'Are you sure? It will destroy all selected topics';&lt;br /&gt;
    if (confirm(msg)) {&lt;br /&gt;
        var identifiers = []&lt;br /&gt;
        $(&amp;quot;#Table1 input[type=checkbox]:checked&amp;quot;).each(function() {&lt;br /&gt;
            var ient = $(this).closest('tr').find('#ident').text();&lt;br /&gt;
            identifiers.push(ient);&lt;br /&gt;
        });&lt;br /&gt;
        jQuery.ajax({&lt;br /&gt;
            url: '/sign_up_sheet/delete_all_selected_topics',&lt;br /&gt;
            method: 'POST',&lt;br /&gt;
            data: {&lt;br /&gt;
                idents: identifiers,&lt;br /&gt;
                a_id: &amp;lt;%= @assignment.id %&amp;gt;&lt;br /&gt;
            },&lt;br /&gt;
            success: function() {&lt;br /&gt;
                location.reload();&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    } else {&lt;br /&gt;
        window.location.href = '&amp;lt;%= edit_assignment_path(@assignment.id) + &amp;quot;#tabs-2&amp;quot; %&amp;gt;';&lt;br /&gt;
    }&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;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;td&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt; to&lt;br /&gt;
  &amp;lt;td id='ident'&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File: config/routes.rb&lt;br /&gt;
&lt;br /&gt;
Add url.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  post :delete_all_selected_topics&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Test'''==&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Talk:CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125557</id>
		<title>Talk:CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Talk:CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125557"/>
		<updated>2019-10-27T06:47:10Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
If an instructor or a TA wants to delete topics he has to delete one topic at a time and has to wait for the page to refresh and then (s)he can proceed to delete the next topic, topics can only be deleted one by one.&lt;br /&gt;
&lt;br /&gt;
===To fix the problem:===&lt;br /&gt;
1.There should be a checkbox column, along with other columns in “Topics” tab, where a user can select the topics (s)he wants to delete.&lt;br /&gt;
&lt;br /&gt;
2.There should be a delete button/link at the end of the topic table with the name “delete selected topics” to delete the selected topics after a confirmation, prompted post clicking the button/link.&lt;br /&gt;
&lt;br /&gt;
3.There should be a button/link alongside “delete selected topics” by the name “Select all” so that a user can select all and delete them in one go after clicking on “delete selected topics”.&lt;br /&gt;
&lt;br /&gt;
=='''Solution'''==&lt;br /&gt;
&lt;br /&gt;
===1.Modify view===&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add bottoms of 'Delete select topics' and 'Select all'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Delete select topics&amp;quot; onclick=&amp;quot;deleteTopics()&amp;quot; /&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;a id=&amp;quot;select all &amp;quot; onclick=&amp;quot;checkAll()&amp;quot;&amp;gt;Select all&amp;lt;/a&amp;gt; |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
&lt;br /&gt;
Add 'Select' header&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Select?&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
Add selected checkbox&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;query_mySelectBox&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===2.'Select All' function===&lt;br /&gt;
File: app/assets/javascripts/signup.js &lt;br /&gt;
&lt;br /&gt;
Select All function clicks all checkbox of topics.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  function selectAll(source) {&lt;br /&gt;
      checkboxes = document.getElementsByName('mySelectBox');&lt;br /&gt;
      for (var i = 0, n = checkboxes.length; i &amp;lt; n; i++) {&lt;br /&gt;
          checkboxes[i].checked = source.checked;&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===3.'Delete' function===&lt;br /&gt;
File: app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # This deletes all selected topics&lt;br /&gt;
  def delete_all_selected_topics&lt;br /&gt;
    load_all_selected_topics&lt;br /&gt;
    @stopics.each(&amp;amp;:destroy)&lt;br /&gt;
    flash[:success] = &amp;quot;All selected topics have been deleted successfully.&amp;quot;&lt;br /&gt;
    respond_to do |format|&lt;br /&gt;
      format.html { redirect_to edit_assignment_path(params[:a_id]) + &amp;quot;#tabs-2&amp;quot; }&lt;br /&gt;
      format.js {}&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # This get all selected topics&lt;br /&gt;
  def load_all_selected_topics&lt;br /&gt;
    @stopics = SignUpTopic.where(assignment_id: params[:a_id], topic_identifier: params[:idents])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt; to&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot; id=&amp;quot;Table1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
  function deleteTopics() {&lt;br /&gt;
    var msg = 'Are you sure? It will destroy all selected topics';&lt;br /&gt;
    if (confirm(msg)) {&lt;br /&gt;
        var identifiers = []&lt;br /&gt;
        $(&amp;quot;#Table1 input[type=checkbox]:checked&amp;quot;).each(function() {&lt;br /&gt;
            var ient = $(this).closest('tr').find('#ident').text();&lt;br /&gt;
            identifiers.push(ient);&lt;br /&gt;
        });&lt;br /&gt;
        jQuery.ajax({&lt;br /&gt;
            url: '/sign_up_sheet/delete_all_selected_topics',&lt;br /&gt;
            method: 'POST',&lt;br /&gt;
            data: {&lt;br /&gt;
                idents: identifiers,&lt;br /&gt;
                a_id: &amp;lt;%= @assignment.id %&amp;gt;&lt;br /&gt;
            },&lt;br /&gt;
            success: function() {&lt;br /&gt;
                location.reload();&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    } else {&lt;br /&gt;
        window.location.href = '&amp;lt;%= edit_assignment_path(@assignment.id) + &amp;quot;#tabs-2&amp;quot; %&amp;gt;';&lt;br /&gt;
    }&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;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;td&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt; to&lt;br /&gt;
  &amp;lt;td id='ident'&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: config/routes.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  post :delete_all_selected_topics&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Test'''==&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Talk:CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125556</id>
		<title>Talk:CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Talk:CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125556"/>
		<updated>2019-10-27T06:16:01Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
If an instructor or a TA wants to delete topics he has to delete one topic at a time and has to wait for the page to refresh and then (s)he can proceed to delete the next topic, topics can only be deleted one by one.&lt;br /&gt;
&lt;br /&gt;
===To fix the problem:===&lt;br /&gt;
1.There should be a checkbox column, along with other columns in “Topics” tab, where a user can select the topics (s)he wants to delete.&lt;br /&gt;
&lt;br /&gt;
2.There should be a delete button/link at the end of the topic table with the name “delete selected topics” to delete the selected topics after a confirmation, prompted post clicking the button/link.&lt;br /&gt;
&lt;br /&gt;
3.There should be a button/link alongside “delete selected topics” by the name “Select all” so that a user can select all and delete them in one go after clicking on “delete selected topics”.&lt;br /&gt;
&lt;br /&gt;
=='''Solution'''==&lt;br /&gt;
&lt;br /&gt;
===1.Modify view===&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add bottoms of 'Delete select topics' and 'Select all'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Delete select topics&amp;quot; onclick=&amp;quot;deleteTopics()&amp;quot; /&amp;gt;|&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;a id=&amp;quot;select all &amp;quot; onclick=&amp;quot;checkAll()&amp;quot;&amp;gt;Select all&amp;lt;/a&amp;gt; |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Select?&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;query_mySelectBox&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===2.'Select All' function===&lt;br /&gt;
File: app/assets/javascripts/signup.js &lt;br /&gt;
&lt;br /&gt;
Add select all function&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  function selectAll(source) {&lt;br /&gt;
      checkboxes = document.getElementsByName('mySelectBox');&lt;br /&gt;
      for (var i = 0, n = checkboxes.length; i &amp;lt; n; i++) {&lt;br /&gt;
          checkboxes[i].checked = source.checked;&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===3.'Delete' function===&lt;br /&gt;
File: app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # This deletes all selected topics&lt;br /&gt;
  def delete_all_selected_topics&lt;br /&gt;
    load_all_selected_topics&lt;br /&gt;
    @stopics.each(&amp;amp;:destroy)&lt;br /&gt;
    flash[:success] = &amp;quot;All selected topics have been deleted successfully.&amp;quot;&lt;br /&gt;
    respond_to do |format|&lt;br /&gt;
      format.html { redirect_to edit_assignment_path(params[:a_id]) + &amp;quot;#tabs-2&amp;quot; }&lt;br /&gt;
      format.js {}&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # This get all selected topics&lt;br /&gt;
  def load_all_selected_topics&lt;br /&gt;
    @stopics = SignUpTopic.where(assignment_id: params[:a_id], topic_identifier: params[:idents])&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;table class=&amp;quot;table table-striped&amp;quot;&amp;gt; to&lt;br /&gt;
  &amp;lt;table class=&amp;quot;table table-striped&amp;quot; id=&amp;quot;Table1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
  function deleteTopics() {&lt;br /&gt;
    var msg = 'Are you sure? It will destroy all selected topics';&lt;br /&gt;
    if (confirm(msg)) {&lt;br /&gt;
        var identifiers = []&lt;br /&gt;
        $(&amp;quot;#Table1 input[type=checkbox]:checked&amp;quot;).each(function() {&lt;br /&gt;
            var ient = $(this).closest('tr').find('#ident').text();&lt;br /&gt;
            identifiers.push(ient);&lt;br /&gt;
        });&lt;br /&gt;
        jQuery.ajax({&lt;br /&gt;
            url: '/sign_up_sheet/delete_all_selected_topics',&lt;br /&gt;
            method: 'POST',&lt;br /&gt;
            data: {&lt;br /&gt;
                idents: identifiers,&lt;br /&gt;
                a_id: &amp;lt;%= @assignment.id %&amp;gt;&lt;br /&gt;
            },&lt;br /&gt;
            success: function() {&lt;br /&gt;
                location.reload();&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    } else {&lt;br /&gt;
        window.location.href = '&amp;lt;%= edit_assignment_path(@assignment.id) + &amp;quot;#tabs-2&amp;quot; %&amp;gt;';&lt;br /&gt;
    }&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;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #change &amp;lt;td&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt; to&lt;br /&gt;
  &amp;lt;td id='ident'&amp;gt;&amp;lt;%= topic.topic_identifier %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: config/routes.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  post :delete_all_selected_topics&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Test'''==&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Talk:CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125555</id>
		<title>Talk:CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Talk:CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125555"/>
		<updated>2019-10-27T04:59:58Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
If an instructor or a TA wants to delete topics he has to delete one topic at a time and has to wait for the page to refresh and then (s)he can proceed to delete the next topic, topics can only be deleted one by one.&lt;br /&gt;
&lt;br /&gt;
===To fix the problem:===&lt;br /&gt;
1.There should be a checkbox column, along with other columns in “Topics” tab, where a user can select the topics (s)he wants to delete.&lt;br /&gt;
&lt;br /&gt;
2.There should be a delete button/link at the end of the topic table with the name “delete selected topics” to delete the selected topics after a confirmation, prompted post clicking the button/link.&lt;br /&gt;
&lt;br /&gt;
3.There should be a button/link alongside “delete selected topics” by the name “Select all” so that a user can select all and delete them in one go after clicking on “delete selected topics”.&lt;br /&gt;
&lt;br /&gt;
=='''Solution'''==&lt;br /&gt;
&lt;br /&gt;
===1.Modify view===&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add bottoms of 'Delete select topics' and 'Select all'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;%= link_to 'Delete select topics',&lt;br /&gt;
                :controller =&amp;gt; 'sign_up_sheet',&lt;br /&gt;
                :action =&amp;gt; 'delete',&lt;br /&gt;
                :id =&amp;gt; params[:id]%&amp;gt; |&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= link_to 'Select all',&lt;br /&gt;
                :controller =&amp;gt; 'sign_up_sheet',&lt;br /&gt;
                :action =&amp;gt; 'new',&lt;br /&gt;
                :id =&amp;gt; params[:id]%&amp;gt; |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_header.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;Select?&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: app/views/sign_up_sheet/_table_line.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;query_mySelectBox&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===2.'Select All' function===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3.'Delete' function===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Test'''==&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Talk:CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125537</id>
		<title>Talk:CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Talk:CSC/ECE_517_Fall_2019_-_E1951._Remove_multiple_topics_at_a_time&amp;diff=125537"/>
		<updated>2019-10-27T03:44:15Z</updated>

		<summary type="html">&lt;p&gt;Cwang64: Created page with &amp;quot;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).  =='''Introduction'''== The Expertiza project is software to create reusable learn...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of E1951. Remove multiple topics at a time (Issue #1409).&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
If an instructor or a TA wants to delete topics he has to delete one topic at a time and has to wait for the page to refresh and then (s)he can proceed to delete the next topic, topics can only be deleted one by one.&lt;br /&gt;
&lt;br /&gt;
===To fix the problem:===&lt;br /&gt;
1.There should be a checkbox column, along with other columns in “Topics” tab, where a user can select the topics (s)he wants to delete.&lt;br /&gt;
&lt;br /&gt;
2.There should be a delete button/link at the end of the topic table with the name “delete selected topics” to delete the selected topics after a confirmation, prompted post clicking the button/link.&lt;br /&gt;
&lt;br /&gt;
3.There should be a button/link alongside “delete selected topics” by the name “Select all” so that a user can select all and delete them in one go after clicking on “delete selected topics”.&lt;br /&gt;
&lt;br /&gt;
=='''Solution'''==&lt;br /&gt;
&lt;br /&gt;
===1.Modify view===&lt;br /&gt;
File: app/views/sign_up_sheet/_add_topics.html.erb&lt;br /&gt;
&lt;br /&gt;
Add bottoms of 'Delete select topics' and 'Select all'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;%= link_to 'Delete select topics',&lt;br /&gt;
                :controller =&amp;gt; 'sign_up_sheet',&lt;br /&gt;
                :action =&amp;gt; 'delete',&lt;br /&gt;
                :id =&amp;gt; params[:id]%&amp;gt; |&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= link_to 'Select all',&lt;br /&gt;
                :controller =&amp;gt; 'sign_up_sheet',&lt;br /&gt;
                :action =&amp;gt; 'new',&lt;br /&gt;
                :id =&amp;gt; params[:id]%&amp;gt; |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2.'Select All' function===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3.'Delete' function===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Test'''==&lt;/div&gt;</summary>
		<author><name>Cwang64</name></author>
	</entry>
</feed>