<?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=Diddya</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=Diddya"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Diddya"/>
	<updated>2026-05-06T16:46:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117454</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117454"/>
		<updated>2018-05-05T17:22:12Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* New files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml 1818.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project. The value of the duty for that project team is stored in TeamUsers.&lt;br /&gt;
* AssignmentsDutyMapping stores the value for all duties applicable to a particular assignment, hence it is an aggregation of the duties for an assignment.&lt;br /&gt;
* AssignmentDutyQuestionnaireMapping adds the questionnaire_id for a particular AssignmentDutyMapping thus has a direct dependency to AssignmentDutyMapping and has an association with the Questionnaire table.&lt;br /&gt;
* StudentTeams uses the AssignmentDutyMapping to table to find available duties for a particular assignment to allow teammates to select. It then uses the Duty table to fetch the respective name of the found duty_id.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
*     Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*       Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*       Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*       Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*       Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*       Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:Instructor_1_1818.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;Add Duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Instructor_2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:Instructor_3_1818.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Instructor_4_1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. &lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Instructor_5_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
&lt;br /&gt;
[[File:student_4_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 '''In this file, a ''duties'' table is created with a name field&lt;br /&gt;
'''&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  '''In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  '''In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  '''In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  '''In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
*     test/controllers/duties_controller_test.rb&lt;br /&gt;
 '''In this file tests have been created to test the duties controller.'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
 spec/features/assignment_creation_spec.rb&lt;br /&gt;
**	While creating an assignment, in the Review Strategy tab, check the box for role based reviewing and expect the 'role_based_review' column of Assignments table to be true.&lt;br /&gt;
**      Ability to add new duties from the Review Strategy tab. Click on 'Add Duty' and get redirected to a new page where there is the option of adding a name for duty in the text-box and click 'Create Duty'. This new added duty will now be displayed in the Review Strategy tab if the role-based-review option is selected.&lt;br /&gt;
**	Select from already existing and newly added duties for a particular assignment. After saving, the changes should be reflected in the database 'AssignmentsDutyMapping' table.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
 spec/features/student_duty_spec.rb&lt;br /&gt;
**	When a student visits 'Your Team' link, if the option of role based review is selected while creating the assignment, a link 'Select' should appear which enables the student to select the duty.&lt;br /&gt;
**	In the 'Your Team' tab, after clicking the 'Select' link, the student should be able to select one duty (radio button). This selected duty should now be visible on the 'Your Team' page.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [https://youtu.be/jMQCJUeqA1Q Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117453</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117453"/>
		<updated>2018-05-05T17:20:48Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml 1818.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project. The value of the duty for that project team is stored in TeamUsers.&lt;br /&gt;
* AssignmentsDutyMapping stores the value for all duties applicable to a particular assignment, hence it is an aggregation of the duties for an assignment.&lt;br /&gt;
* AssignmentDutyQuestionnaireMapping adds the questionnaire_id for a particular AssignmentDutyMapping thus has a direct dependency to AssignmentDutyMapping and has an association with the Questionnaire table.&lt;br /&gt;
* StudentTeams uses the AssignmentDutyMapping to table to find available duties for a particular assignment to allow teammates to select. It then uses the Duty table to fetch the respective name of the found duty_id.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
*     Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*       Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*       Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*       Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*       Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*       Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:Instructor_1_1818.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;Add Duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Instructor_2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:Instructor_3_1818.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Instructor_4_1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. &lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Instructor_5_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
&lt;br /&gt;
[[File:student_4_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 '''In this file, a ''duties'' table is created with a name field&lt;br /&gt;
'''&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  '''In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  '''In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  '''In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  '''In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
 spec/features/assignment_creation_spec.rb&lt;br /&gt;
**	While creating an assignment, in the Review Strategy tab, check the box for role based reviewing and expect the 'role_based_review' column of Assignments table to be true.&lt;br /&gt;
**      Ability to add new duties from the Review Strategy tab. Click on 'Add Duty' and get redirected to a new page where there is the option of adding a name for duty in the text-box and click 'Create Duty'. This new added duty will now be displayed in the Review Strategy tab if the role-based-review option is selected.&lt;br /&gt;
**	Select from already existing and newly added duties for a particular assignment. After saving, the changes should be reflected in the database 'AssignmentsDutyMapping' table.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
 spec/features/student_duty_spec.rb&lt;br /&gt;
**	When a student visits 'Your Team' link, if the option of role based review is selected while creating the assignment, a link 'Select' should appear which enables the student to select the duty.&lt;br /&gt;
**	In the 'Your Team' tab, after clicking the 'Select' link, the student should be able to select one duty (radio button). This selected duty should now be visible on the 'Your Team' page.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [https://youtu.be/jMQCJUeqA1Q Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117447</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117447"/>
		<updated>2018-05-04T15:57:28Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Student view changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml 1818.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project. The value of the duty for that project team is stored in TeamUsers.&lt;br /&gt;
* AssignmentsDutyMapping stores the value for all duties applicable to a particular assignment, hence it is an aggregation of the duties for an assignment.&lt;br /&gt;
* AssignmentDutyQuestionnaireMapping adds the questionnaire_id for a particular AssignmentDutyMapping thus has a direct dependency to AssignmentDutyMapping and has an association with the Questionnaire table.&lt;br /&gt;
* StudentTeams uses the AssignmentDutyMapping to table to find available duties for a particular assignment to allow teammates to select. It then uses the Duty table to fetch the respective name of the found duty_id.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
*     Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*       Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*       Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*       Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*       Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*       Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:Instructor_1_1818.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;Add Duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Instructor_2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:Instructor_3_1818.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Instructor_4_1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. &lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Instructor_5_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
&lt;br /&gt;
[[File:student_4_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 '''In this file, a ''duties'' table is created with a name field&lt;br /&gt;
'''&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  '''In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  '''In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  '''In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  '''In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	While creating an assignment, in the Review Strategy tab, check the box for role based reviewing and expect the 'role_based_review' column of Assignments table to be true.&lt;br /&gt;
**      Ability to add new duties from the Review Strategy tab. Click on 'Add Duty' and get redirected to a new page where there is the option of adding a name for duty in the text-box and click 'Create Duty'. This new added duty will now be displayed in the Review Strategy tab if the role-based-review option is selected.&lt;br /&gt;
**	Select from already existing and newly added duties for a particular assignment. After saving, the changes should be reflected in the database 'AssignmentsDutyMapping' table.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	When a student visits 'Your Team' link, if the option of role based review is selected while creating the assignment, a link 'Select' should appear which enables the student to select the duty.&lt;br /&gt;
**	In the 'Your Team' tab, after clicking the 'Select' link, the student should be able to select one duty (radio button). This selected duty should now be visible on the 'Your Team' page.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [https://youtu.be/jMQCJUeqA1Q Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_5_1818.jpg&amp;diff=117446</id>
		<title>File:Student 5 1818.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_5_1818.jpg&amp;diff=117446"/>
		<updated>2018-05-04T15:56:54Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117445</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117445"/>
		<updated>2018-05-04T15:56:39Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Student view changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml 1818.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project. The value of the duty for that project team is stored in TeamUsers.&lt;br /&gt;
* AssignmentsDutyMapping stores the value for all duties applicable to a particular assignment, hence it is an aggregation of the duties for an assignment.&lt;br /&gt;
* AssignmentDutyQuestionnaireMapping adds the questionnaire_id for a particular AssignmentDutyMapping thus has a direct dependency to AssignmentDutyMapping and has an association with the Questionnaire table.&lt;br /&gt;
* StudentTeams uses the AssignmentDutyMapping to table to find available duties for a particular assignment to allow teammates to select. It then uses the Duty table to fetch the respective name of the found duty_id.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
*     Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*       Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*       Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*       Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*       Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*       Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:Instructor_1_1818.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;Add Duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Instructor_2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:Instructor_3_1818.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Instructor_4_1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. &lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Instructor_5_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
&lt;br /&gt;
[[File:student_4_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
&lt;br /&gt;
[[File:student_5_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 '''In this file, a ''duties'' table is created with a name field&lt;br /&gt;
'''&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  '''In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  '''In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  '''In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  '''In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	While creating an assignment, in the Review Strategy tab, check the box for role based reviewing and expect the 'role_based_review' column of Assignments table to be true.&lt;br /&gt;
**      Ability to add new duties from the Review Strategy tab. Click on 'Add Duty' and get redirected to a new page where there is the option of adding a name for duty in the text-box and click 'Create Duty'. This new added duty will now be displayed in the Review Strategy tab if the role-based-review option is selected.&lt;br /&gt;
**	Select from already existing and newly added duties for a particular assignment. After saving, the changes should be reflected in the database 'AssignmentsDutyMapping' table.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	When a student visits 'Your Team' link, if the option of role based review is selected while creating the assignment, a link 'Select' should appear which enables the student to select the duty.&lt;br /&gt;
**	In the 'Your Team' tab, after clicking the 'Select' link, the student should be able to select one duty (radio button). This selected duty should now be visible on the 'Your Team' page.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [https://youtu.be/jMQCJUeqA1Q Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_4_1818.jpg&amp;diff=117444</id>
		<title>File:Student 4 1818.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_4_1818.jpg&amp;diff=117444"/>
		<updated>2018-05-04T15:56:08Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117443</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117443"/>
		<updated>2018-05-04T15:55:55Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Student view changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml 1818.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project. The value of the duty for that project team is stored in TeamUsers.&lt;br /&gt;
* AssignmentsDutyMapping stores the value for all duties applicable to a particular assignment, hence it is an aggregation of the duties for an assignment.&lt;br /&gt;
* AssignmentDutyQuestionnaireMapping adds the questionnaire_id for a particular AssignmentDutyMapping thus has a direct dependency to AssignmentDutyMapping and has an association with the Questionnaire table.&lt;br /&gt;
* StudentTeams uses the AssignmentDutyMapping to table to find available duties for a particular assignment to allow teammates to select. It then uses the Duty table to fetch the respective name of the found duty_id.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
*     Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*       Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*       Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*       Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*       Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*       Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:Instructor_1_1818.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;Add Duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Instructor_2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:Instructor_3_1818.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Instructor_4_1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. &lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Instructor_5_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
[[File:student_4_1818.jpg]]&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 '''In this file, a ''duties'' table is created with a name field&lt;br /&gt;
'''&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  '''In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  '''In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  '''In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  '''In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	While creating an assignment, in the Review Strategy tab, check the box for role based reviewing and expect the 'role_based_review' column of Assignments table to be true.&lt;br /&gt;
**      Ability to add new duties from the Review Strategy tab. Click on 'Add Duty' and get redirected to a new page where there is the option of adding a name for duty in the text-box and click 'Create Duty'. This new added duty will now be displayed in the Review Strategy tab if the role-based-review option is selected.&lt;br /&gt;
**	Select from already existing and newly added duties for a particular assignment. After saving, the changes should be reflected in the database 'AssignmentsDutyMapping' table.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	When a student visits 'Your Team' link, if the option of role based review is selected while creating the assignment, a link 'Select' should appear which enables the student to select the duty.&lt;br /&gt;
**	In the 'Your Team' tab, after clicking the 'Select' link, the student should be able to select one duty (radio button). This selected duty should now be visible on the 'Your Team' page.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [https://youtu.be/jMQCJUeqA1Q Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_3_1818.jpg&amp;diff=117442</id>
		<title>File:Student 3 1818.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_3_1818.jpg&amp;diff=117442"/>
		<updated>2018-05-04T15:55:28Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_2_1818.jpg&amp;diff=117441</id>
		<title>File:Student 2 1818.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_2_1818.jpg&amp;diff=117441"/>
		<updated>2018-05-04T15:54:20Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_1_1818_1.jpg&amp;diff=117440</id>
		<title>File:Student 1 1818 1.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_1_1818_1.jpg&amp;diff=117440"/>
		<updated>2018-05-04T15:53:36Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117439</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117439"/>
		<updated>2018-05-04T15:52:52Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Student view changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml 1818.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project. The value of the duty for that project team is stored in TeamUsers.&lt;br /&gt;
* AssignmentsDutyMapping stores the value for all duties applicable to a particular assignment, hence it is an aggregation of the duties for an assignment.&lt;br /&gt;
* AssignmentDutyQuestionnaireMapping adds the questionnaire_id for a particular AssignmentDutyMapping thus has a direct dependency to AssignmentDutyMapping and has an association with the Questionnaire table.&lt;br /&gt;
* StudentTeams uses the AssignmentDutyMapping to table to find available duties for a particular assignment to allow teammates to select. It then uses the Duty table to fetch the respective name of the found duty_id.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
*     Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*       Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*       Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*       Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*       Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*       Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:Instructor_1_1818.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;Add Duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Instructor_2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:Instructor_3_1818.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Instructor_4_1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. &lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Instructor_5_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 '''In this file, a ''duties'' table is created with a name field&lt;br /&gt;
'''&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  '''In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  '''In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  '''In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  '''In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	While creating an assignment, in the Review Strategy tab, check the box for role based reviewing and expect the 'role_based_review' column of Assignments table to be true.&lt;br /&gt;
**      Ability to add new duties from the Review Strategy tab. Click on 'Add Duty' and get redirected to a new page where there is the option of adding a name for duty in the text-box and click 'Create Duty'. This new added duty will now be displayed in the Review Strategy tab if the role-based-review option is selected.&lt;br /&gt;
**	Select from already existing and newly added duties for a particular assignment. After saving, the changes should be reflected in the database 'AssignmentsDutyMapping' table.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	When a student visits 'Your Team' link, if the option of role based review is selected while creating the assignment, a link 'Select' should appear which enables the student to select the duty.&lt;br /&gt;
**	In the 'Your Team' tab, after clicking the 'Select' link, the student should be able to select one duty (radio button). This selected duty should now be visible on the 'Your Team' page.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [https://youtu.be/jMQCJUeqA1Q Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_1_1818.jpg&amp;diff=117438</id>
		<title>File:Student 1 1818.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_1_1818.jpg&amp;diff=117438"/>
		<updated>2018-05-04T15:52:30Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_5_1818.png&amp;diff=117437</id>
		<title>File:Instructor 5 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_5_1818.png&amp;diff=117437"/>
		<updated>2018-05-04T15:50:35Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_4_1818.png&amp;diff=117436</id>
		<title>File:Instructor 4 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_4_1818.png&amp;diff=117436"/>
		<updated>2018-05-04T15:49:31Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_3_1818.png&amp;diff=117435</id>
		<title>File:Instructor 3 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_3_1818.png&amp;diff=117435"/>
		<updated>2018-05-04T15:49:15Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_2_1818.png&amp;diff=117434</id>
		<title>File:Instructor 2 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_2_1818.png&amp;diff=117434"/>
		<updated>2018-05-04T15:48:57Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_1_1818.png&amp;diff=117433</id>
		<title>File:Instructor 1 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_1_1818.png&amp;diff=117433"/>
		<updated>2018-05-04T15:48:37Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117430</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117430"/>
		<updated>2018-05-04T15:42:39Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Instructor view changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml 1818.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project. The value of the duty for that project team is stored in TeamUsers.&lt;br /&gt;
* AssignmentsDutyMapping stores the value for all duties applicable to a particular assignment, hence it is an aggregation of the duties for an assignment.&lt;br /&gt;
* AssignmentDutyQuestionnaireMapping adds the questionnaire_id for a particular AssignmentDutyMapping thus has a direct dependency to AssignmentDutyMapping and has an association with the Questionnaire table.&lt;br /&gt;
* StudentTeams uses the AssignmentDutyMapping to table to find available duties for a particular assignment to allow teammates to select. It then uses the Duty table to fetch the respective name of the found duty_id.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
*     Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*       Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*       Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*       Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*       Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*       Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:Instructor_1_1818.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;Add Duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Instructor_2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:Instructor_3_1818.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Instructor_4_1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. &lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Instructor_5_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 '''In this file, a ''duties'' table is created with a name field&lt;br /&gt;
'''&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  '''In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  '''In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  '''In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  '''In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	While creating an assignment, in the Review Strategy tab, check the box for role based reviewing and expect the 'role_based_review' column of Assignments table to be true.&lt;br /&gt;
**      Ability to add new duties from the Review Strategy tab. Click on 'Add Duty' and get redirected to a new page where there is the option of adding a name for duty in the text-box and click 'Create Duty'. This new added duty will now be displayed in the Review Strategy tab if the role-based-review option is selected.&lt;br /&gt;
**	Select from already existing and newly added duties for a particular assignment. After saving, the changes should be reflected in the database 'AssignmentsDutyMapping' table.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	When a student visits 'Your Team' link, if the option of role based review is selected while creating the assignment, a link 'Select' should appear which enables the student to select the duty.&lt;br /&gt;
**	In the 'Your Team' tab, after clicking the 'Select' link, the student should be able to select one duty (radio button). This selected duty should now be visible on the 'Your Team' page.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [http://www.example.com Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117428</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117428"/>
		<updated>2018-05-04T15:40:01Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Instructor view changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml 1818.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project. The value of the duty for that project team is stored in TeamUsers.&lt;br /&gt;
* AssignmentsDutyMapping stores the value for all duties applicable to a particular assignment, hence it is an aggregation of the duties for an assignment.&lt;br /&gt;
* AssignmentDutyQuestionnaireMapping adds the questionnaire_id for a particular AssignmentDutyMapping thus has a direct dependency to AssignmentDutyMapping and has an association with the Questionnaire table.&lt;br /&gt;
* StudentTeams uses the AssignmentDutyMapping to table to find available duties for a particular assignment to allow teammates to select. It then uses the Duty table to fetch the respective name of the found duty_id.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
*     Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*       Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*       Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*       Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*       Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*       Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:Instructor_1_1818.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;Add Duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Instructor_2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:Instructor_3_1818.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Instructor_4_1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. &lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Instructor_5_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Instructor_6_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 '''In this file, a ''duties'' table is created with a name field&lt;br /&gt;
'''&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  '''In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  '''In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  '''In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  '''In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	While creating an assignment, in the Review Strategy tab, check the box for role based reviewing and expect the 'role_based_review' column of Assignments table to be true.&lt;br /&gt;
**      Ability to add new duties from the Review Strategy tab. Click on 'Add Duty' and get redirected to a new page where there is the option of adding a name for duty in the text-box and click 'Create Duty'. This new added duty will now be displayed in the Review Strategy tab if the role-based-review option is selected.&lt;br /&gt;
**	Select from already existing and newly added duties for a particular assignment. After saving, the changes should be reflected in the database 'AssignmentsDutyMapping' table.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	When a student visits 'Your Team' link, if the option of role based review is selected while creating the assignment, a link 'Select' should appear which enables the student to select the duty.&lt;br /&gt;
**	In the 'Your Team' tab, after clicking the 'Select' link, the student should be able to select one duty (radio button). This selected duty should now be visible on the 'Your Team' page.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [http://www.example.com Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117421</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117421"/>
		<updated>2018-05-04T15:22:43Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Instructor view changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml 1818.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
*     Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*       Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*       Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*       Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*       Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*       Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:Instructor_1_1818.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Instructor_2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:Instructor_3_1818.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Instructor_4_1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. &lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Instructor_5_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Instructor_6_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 '''In this file, a ''duties'' table is created with a name field&lt;br /&gt;
'''&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  '''In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  '''In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  '''In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  '''In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	While creating an assignment, in the Review Strategy tab, check the box for role based reviewing and expect the 'role_based_review' column of Assignments table to be true.&lt;br /&gt;
**      Ability to add new duties from the Review Strategy tab. Click on 'Add Duty' and get redirected to a new page where there is the option of adding a name for duty in the text-box and click 'Create Duty'. This new added duty will now be displayed in the Review Strategy tab if the role-based-review option is selected.&lt;br /&gt;
**	Select from already existing and newly added duties for a particular assignment. After saving, the changes should be reflected in the database 'AssignmentsDutyMapping' table.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	When a student visits 'Your Team' link, if the option of role based review is selected while creating the assignment, a link 'Select' should appear which enables the student to select the duty.&lt;br /&gt;
**	In the 'Your Team' tab, after clicking the 'Select' link, the student should be able to select one duty (radio button). This selected duty should now be visible on the 'Your Team' page.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [http://www.example.com Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117414</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117414"/>
		<updated>2018-05-04T15:18:43Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* New files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
*     Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*       Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*       Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*       Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*       Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*       Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:Instructor_1_1818.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Instructor_2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:Instructor_3_1818.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Instructor_4_1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Instructor_5_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Instructor_6_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 '''In this file, a ''duties'' table is created with a name field&lt;br /&gt;
'''&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  '''In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  '''In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  '''In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  '''In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	While creating an assignment, in the Review Strategy tab, check the box for role based reviewing and expect the 'role_based_review' column of Assignments table to be true.&lt;br /&gt;
**      Ability to add new duties from the Review Strategy tab. Click on 'Add Duty' and get redirected to a new page where there is the option of adding a name for duty in the text-box and click 'Create Duty'. This new added duty will now be displayed in the Review Strategy tab if the role-based-review option is selected.&lt;br /&gt;
**	Select from already existing and newly added duties for a particular assignment. After saving, the changes should be reflected in the database 'AssignmentsDutyMapping' table.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	When a student visits 'Your Team' link, if the option of role based review is selected while creating the assignment, a link 'Select' should appear which enables the student to select the duty.&lt;br /&gt;
**	In the 'Your Team' tab, after clicking the 'Select' link, the student should be able to select one duty (radio button). This selected duty should now be visible on the 'Your Team' page.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [http://www.example.com Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117409</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117409"/>
		<updated>2018-05-04T15:10:26Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Migration changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
*     Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*       Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*       Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*       Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*       Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*       Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:Instructor_1_1818.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Instructor_2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:Instructor_3_1818.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Instructor_4_1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Instructor_5_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Instructor_6_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field'''&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*     ''' db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [http://www.example.com Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117408</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117408"/>
		<updated>2018-05-04T15:09:35Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Migration changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
* '''     Create Duties table: This table stores all the duties created by any instructor.'''&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
* '''      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.'''&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
* '''      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id.''' &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
* '''      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.'''&lt;br /&gt;
* '''      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role.''' &lt;br /&gt;
* '''      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.'''&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:Instructor_1_1818.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Instructor_2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:Instructor_3_1818.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Instructor_4_1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Instructor_5_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Instructor_6_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field'''&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*     ''' db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [http://www.example.com Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117407</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117407"/>
		<updated>2018-05-04T15:08:44Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Instructor view changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
'''*     Create Duties table: This table stores all the duties created by any instructor.'''&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
'''*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.'''&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
'''*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id.''' &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
'''*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.'''&lt;br /&gt;
'''*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role.''' &lt;br /&gt;
'''*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.'''&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:Instructor_1_1818.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Instructor_2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:Instructor_3_1818.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Instructor_4_1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Instructor_5_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Instructor_6_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field'''&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*     ''' db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [http://www.example.com Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117406</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117406"/>
		<updated>2018-05-04T15:06:40Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* New files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
'''*     Create Duties table: This table stores all the duties created by any instructor.'''&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
'''*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.'''&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
'''*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id.''' &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
'''*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.'''&lt;br /&gt;
'''*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role.''' &lt;br /&gt;
'''*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.'''&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field'''&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.'''&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table'''&lt;br /&gt;
&lt;br /&gt;
*     ''' db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table'''&lt;br /&gt;
&lt;br /&gt;
*      '''db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [http://www.example.com Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117405</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117405"/>
		<updated>2018-05-04T15:05:14Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
'''*     Create Duties table: This table stores all the duties created by any instructor.'''&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
'''*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.'''&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
'''*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id.''' &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
'''*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.'''&lt;br /&gt;
'''*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role.''' &lt;br /&gt;
'''*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.'''&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Main Page Expertiza] &lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181 Github Pull Request] &lt;br /&gt;
*       [http://www.example.com Youtube Screencast]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117404</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117404"/>
		<updated>2018-05-04T15:03:58Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
'''*     Create Duties table: This table stores all the duties created by any instructor.'''&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
'''*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.'''&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
'''*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id.''' &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
'''*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.'''&lt;br /&gt;
'''*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role.''' &lt;br /&gt;
'''*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.'''&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page] Main Page for Expertiza&lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181] Github Pull Request&lt;br /&gt;
*       [http://www.example.com link title] Youtube Video&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117403</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117403"/>
		<updated>2018-05-04T15:02:14Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
'''*     Create Duties table: This table stores all the duties created by any instructor.'''&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
'''*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.'''&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
'''*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id.''' &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
'''*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.'''&lt;br /&gt;
'''*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role.''' &lt;br /&gt;
'''*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.'''&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
*       [http://wiki.expertiza.ncsu.edu/index.php/Main_Page]&lt;br /&gt;
*       [https://github.com/expertiza/expertiza/pull/1181]&lt;br /&gt;
*       [http://www.example.com link title]&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117402</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117402"/>
		<updated>2018-05-04T14:57:28Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Migration changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
'''*     Create Duties table: This table stores all the duties created by any instructor.'''&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
'''*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.'''&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
'''*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id.''' &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
'''*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.'''&lt;br /&gt;
'''*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role.''' &lt;br /&gt;
'''*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.'''&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117372</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117372"/>
		<updated>2018-05-03T20:02:58Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Files that have to be modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
* .    Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt;if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt;This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117371</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117371"/>
		<updated>2018-05-03T20:02:25Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Files that have to be modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
* .    Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment &amp;lt;br&amp;gt; if role based reviewing is permitted or else the standard view is displayed.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. &amp;lt;br&amp;gt; This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.&amp;lt;br&amp;gt; If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_view_1_1818.png&amp;diff=117370</id>
		<title>File:Student view 1 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_view_1_1818.png&amp;diff=117370"/>
		<updated>2018-05-03T19:53:31Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117369</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117369"/>
		<updated>2018-05-03T19:53:09Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Files to be modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
* .    Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files changes==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties and a dropdown for selecting a teammate review for the selected duties if role based reviewing is permitted or else display the standard view.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed. If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_view_1818.png&amp;diff=117368</id>
		<title>File:Student view 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_view_1818.png&amp;diff=117368"/>
		<updated>2018-05-03T19:51:43Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117367</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117367"/>
		<updated>2018-05-03T19:51:11Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Files that have to be modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
* .    Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties and a dropdown for selecting a teammate review for the selected duties if role based reviewing is permitted or else display the standard view.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 ''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed. If not, the standard view is displayed.''' &lt;br /&gt;
[[File:Student_view_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Rubrics_1818.png&amp;diff=117366</id>
		<title>File:Rubrics 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Rubrics_1818.png&amp;diff=117366"/>
		<updated>2018-05-03T19:45:44Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117365</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117365"/>
		<updated>2018-05-03T19:45:31Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Files that have to be modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
* .    Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties and a dropdown for selecting a teammate review for the selected duties if role based reviewing is permitted or else display the standard view.'''&lt;br /&gt;
&lt;br /&gt;
[[File:rubrics_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 '''In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.'''&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
''' In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed. If not, the standard view is displayed.''' &lt;br /&gt;
&lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 '''In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 '''A new questionnaire will be created for each new duty created or the same questionnaire can be used.'''&lt;br /&gt;
&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 '''A newly created questionnaire for a particular duty can be edited.'''&lt;br /&gt;
&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Hidden2_1818.png&amp;diff=117364</id>
		<title>File:Hidden2 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Hidden2_1818.png&amp;diff=117364"/>
		<updated>2018-05-03T19:43:10Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117363</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117363"/>
		<updated>2018-05-03T19:43:00Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Files that have to be modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
* .    Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden2_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties and a dropdown for selecting a teammate review for the selected duties if role based reviewing is permitted or else display the standard view.'''&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed. If not, the standard view is displayed. &lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 A new questionnaire will be created for each new duty created or the same questionnaire can be used.&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 A newly created questionnaire for a particular duty can be edited.&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117362</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117362"/>
		<updated>2018-05-03T19:42:19Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Files that have to be modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
* .    Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
[[File:hidden_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties and a dropdown for selecting a teammate review for the selected duties if role based reviewing is permitted or else display the standard view.'''&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed. If not, the standard view is displayed. &lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 A new questionnaire will be created for each new duty created or the same questionnaire can be used.&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 A newly created questionnaire for a particular duty can be edited.&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Hidden_1818.png&amp;diff=117361</id>
		<title>File:Hidden 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Hidden_1818.png&amp;diff=117361"/>
		<updated>2018-05-03T19:41:05Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117360</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117360"/>
		<updated>2018-05-03T19:40:51Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Files that have to be modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
* .    Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
&lt;br /&gt;
 [[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
 [[File:hidden_1818.png]]&lt;br /&gt;
&lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties and a dropdown for selecting a teammate review for the selected duties if role based reviewing is permitted or else display the standard view.'''&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed. If not, the standard view is displayed. &lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 A new questionnaire will be created for each new duty created or the same questionnaire can be used.&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 A newly created questionnaire for a particular duty can be edited.&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_strat_1818.png&amp;diff=117359</id>
		<title>File:Review strat 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_strat_1818.png&amp;diff=117359"/>
		<updated>2018-05-03T19:39:01Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117358</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117358"/>
		<updated>2018-05-03T19:38:35Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Files that have to be modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
* .    Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
 [[File:review_strat_1818.png]]&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties and a dropdown for selecting a teammate review for the selected duties if role based reviewing is permitted or else display the standard view.'''&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed. If not, the standard view is displayed. &lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 A new questionnaire will be created for each new duty created or the same questionnaire can be used.&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 A newly created questionnaire for a particular duty can be edited.&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Duties_1818_1.png&amp;diff=117357</id>
		<title>File:Duties 1818 1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Duties_1818_1.png&amp;diff=117357"/>
		<updated>2018-05-03T19:37:02Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Duties_1818_1_final.png&amp;diff=117356</id>
		<title>File:Duties 1818 1 final.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Duties_1818_1_final.png&amp;diff=117356"/>
		<updated>2018-05-03T19:36:29Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117355</id>
		<title>CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2018-_Project_E1818:_Role-based_reviewing&amp;diff=117355"/>
		<updated>2018-05-03T19:35:48Z</updated>

		<summary type="html">&lt;p&gt;Diddya: /* Files that have to be modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.&lt;br /&gt;
&lt;br /&gt;
==UML Diagram==&lt;br /&gt;
&lt;br /&gt;
[[File:Uml2.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a UML Class diagram, The relationships depicted above are as follows: &lt;br /&gt;
&lt;br /&gt;
* Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student. &lt;br /&gt;
** Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.&lt;br /&gt;
** Each student can have 0 or 1 role for a particular project.&lt;br /&gt;
* For each Questionnaire instance, there are one or more Questions that can be stored, hence there is an aggregation relationship from Question to Questionnaire. This is for the grading rubric based on the role.&lt;br /&gt;
* The Question table and the Questionnaire table each will be using the the duty ID to sort out questions for a particular assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The project introduces changes from the instructor view and the student view. The changes are as follow:&lt;br /&gt;
&lt;br /&gt;
===Migration changes===&lt;br /&gt;
* .    Create Duties table: This table stores all the duties created by any instructor.&lt;br /&gt;
               * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.&lt;br /&gt;
               * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. &lt;br /&gt;
               * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.&lt;br /&gt;
&lt;br /&gt;
*      Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.&lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
&lt;br /&gt;
*      Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id. &lt;br /&gt;
               * id &lt;br /&gt;
               * assignment_id &lt;br /&gt;
               * duty_id&lt;br /&gt;
               * questionnaire_id&lt;br /&gt;
&lt;br /&gt;
*      Added a column entry named &amp;quot;role_based_assignment&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the role based review check box.&lt;br /&gt;
*      Added a column entry named &amp;quot;allow_multiple_duties&amp;quot; in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role. &lt;br /&gt;
*      Added a column entry named &amp;quot;Duties&amp;quot; to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.&lt;br /&gt;
&lt;br /&gt;
===Instructor view changes===&lt;br /&gt;
*	For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called &amp;quot;Allow role based review?&amp;quot; is created. This allows an instructor to enable a role based team-mate review for a particular assignment. &lt;br /&gt;
[[File:e18181_3.png]]&lt;br /&gt;
*      When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button &amp;quot;New duty&amp;quot; pops up. This takes us to the create method of Duties controller where an instructor can add new duties. &lt;br /&gt;
[[File:Example_e18181.png]]&lt;br /&gt;
&lt;br /&gt;
*      In order to display the hidden fields, We call the java script function ''dutiesAssign()'' using the ''ischecked'' listener. The function queries the checkbox variable for ''role_based_review'' and depending its value(true or false), the hidden attributes i.e. ''allow_multiple_duties'' and ''duties_dropdown'' are displayed or kept hidden.&lt;br /&gt;
[[File:e18181_2.png]]&lt;br /&gt;
*      The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.&lt;br /&gt;
[[File:Picture1_e1818.png]]&lt;br /&gt;
*      An instructor can decide the number of duties for a particular assignment. We have included a field for ''Allow multiple duties'' but not used it as we have the default case that one duty can be taken by multiple students. Work can be done in the future to allow the instructor to choose if students can take multiple duties.&lt;br /&gt;
*      When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment. &lt;br /&gt;
*      The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.&lt;br /&gt;
[[File:Example2_1818.png]] &lt;br /&gt;
*      In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.&lt;br /&gt;
[[File:Example23_1818.png]]&lt;br /&gt;
*      When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.&lt;br /&gt;
&lt;br /&gt;
===Student view changes=== &lt;br /&gt;
*       When a student goes to “Your team”,  they can see the team members, their selected duties and the option to review if these are enabled. Students will either see &amp;quot;Review&amp;quot; link to start the teammate review or a message that says that &amp;quot;Teammate has not selected a duty.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:student_1_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking &amp;quot;Select&amp;quot; option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.&lt;br /&gt;
&lt;br /&gt;
[[File:student_2_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*  The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted. &lt;br /&gt;
&lt;br /&gt;
[[File:student_3_1818.jpg]]&lt;br /&gt;
&lt;br /&gt;
*	A student can only select one duty.&lt;br /&gt;
*	A team member cannot change their role after the assignment submission deadline.&lt;br /&gt;
*      When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.&lt;br /&gt;
*      After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
&lt;br /&gt;
===New files===&lt;br /&gt;
Some of the new migration files we have created are&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_table.rb&lt;br /&gt;
 In this file, a ''duties'' table is created with a name field&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb&lt;br /&gt;
  In this file, we have adding foreign key reference of ''assignment id'' into ''duties table''.&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_duties_to_users.rb&lt;br /&gt;
  In this file, a column named ''duties'' is added to the ''Users'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/add_multiple_duties_to_assignments.rb&lt;br /&gt;
  In this file, we have added a column ''allow_multiple_duties'' to ''assignments'' table&lt;br /&gt;
&lt;br /&gt;
*      db/migrate/create_assignment_duty_questionnaire_mapping.rb&lt;br /&gt;
  In this file, we have created ''assignment_duty_questionnaire_mappings'' table and added columns for ''questionnaire_id'', ''assignment_id'' and ''duty_id''&lt;br /&gt;
&lt;br /&gt;
===Files that have to be modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*	app/views/assignments/edit/review_strategy.html.erb&lt;br /&gt;
 '''In this file, a checkbox is added to permit role based review.&amp;lt;br&amp;gt;A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.'''&lt;br /&gt;
 &lt;br /&gt;
*      app/views/assignments/edit/rubrics.html.erb&lt;br /&gt;
 '''In this file , a conditional statement is added, which displays the dropdown for selecting duties and a dropdown for selecting a teammate review for the selected duties if role based reviewing is permitted or else display the standard view.'''&lt;br /&gt;
&lt;br /&gt;
*	app/controllers/student_teams/student_teams_controller.rb&lt;br /&gt;
 In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.&lt;br /&gt;
        &lt;br /&gt;
*	app/views/student_teams/view.html.erb&lt;br /&gt;
 In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed. If not, the standard view is displayed. &lt;br /&gt;
*      app/controllers/response_controller.rb&lt;br /&gt;
 In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.&lt;br /&gt;
*	app/questionnaire/new.html.erb&lt;br /&gt;
 A new questionnaire will be created for each new duty created or the same questionnaire can be used.&lt;br /&gt;
*	app/questionnaire/edit.html.erb&lt;br /&gt;
 A newly created questionnaire for a particular duty can be edited.&lt;br /&gt;
*       app/views/duties/_form.html.erb&lt;br /&gt;
 '''In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table''' &lt;br /&gt;
    [[File:duties_1818_1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
*	Instructor tests&lt;br /&gt;
**	Check the box for role based reviewing. &lt;br /&gt;
***	Display and select from already existing roles(duties) with option to create new roles(duties).&lt;br /&gt;
***	Should not be able to see roles(duties) from other instructors.&lt;br /&gt;
***	Select corresponding rubrics for a particular role(duty). &lt;br /&gt;
**      If not, proceed with the default questions for the rubric for the assignment.&lt;br /&gt;
&lt;br /&gt;
*	Student(team member) tests&lt;br /&gt;
**	Before submitting the project, all team members should select a role(duty) for themselves from the roles(duties) set by the instructor.&lt;br /&gt;
**	Multiple students may have the role(duty) but 1 student cannot have multiple roles(duties).&lt;br /&gt;
&lt;br /&gt;
*	Reviewer tests&lt;br /&gt;
**	For the teammate review, only the questions related to the role(duty) selected by the student should appear in the rubric.&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Duties_1818.png&amp;diff=117354</id>
		<title>File:Duties 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Duties_1818.png&amp;diff=117354"/>
		<updated>2018-05-03T19:34:44Z</updated>

		<summary type="html">&lt;p&gt;Diddya: uploaded a new version of &amp;amp;quot;File:Duties 1818.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Duties_1818.png&amp;diff=117353</id>
		<title>File:Duties 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Duties_1818.png&amp;diff=117353"/>
		<updated>2018-05-03T19:33:45Z</updated>

		<summary type="html">&lt;p&gt;Diddya: uploaded a new version of &amp;amp;quot;File:Duties 1818.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Duties_1818.png&amp;diff=117352</id>
		<title>File:Duties 1818.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Duties_1818.png&amp;diff=117352"/>
		<updated>2018-05-03T19:32:37Z</updated>

		<summary type="html">&lt;p&gt;Diddya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Diddya</name></author>
	</entry>
</feed>