<?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=Magoff2</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=Magoff2"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Magoff2"/>
	<updated>2026-05-10T15:42:16Z</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_2016/Badging_System&amp;diff=102298</id>
		<title>CSC/ECE 517 Spring 2016/Badging System</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102298"/>
		<updated>2016-04-25T22:33:16Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Added the rest of walkthrough&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
===Background===&lt;br /&gt;
Much like physical badges in the army and youth scout troops, digital badges are an assessment and credentialing mechanism that is housed and managed online. Badges are designed to make visible and validate learning in both formal and informal settings, and hold the potential to help transform where and how learning is valued. In other words, badges may be used in order to set goals and motivations for students and reward and may help to improve their academic scores. Badges can also be considered as a way to reward student’s success. Moreover, badges can be used by teachers for alternative assessment techniques.&lt;br /&gt;
&lt;br /&gt;
===Purpose===&lt;br /&gt;
One request for the Expertiza system is to add a badging system as a way to measure student performance. Expertiza will take advantage of the motivations created from badges by awarding students with new badges based off providing a variety of factors within the Expertiza system. Some of these badges include: achieving a top percentage of scores in an assignment, achieving a high peer review score, performing well overall in a course and other manual accomplishments deemed necessary by the teaching staff for a course. Instead of implementing the whole badging system, we will call an existing online badging web service, Credly, and integrate it with Expertiza. Instructor can create badges using this service and assign to students.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
===System Requirements===&lt;br /&gt;
The system requirements focuses on adding a 'badging' functionality in Expertiza. This feature allows instructors to assign badges to students based on their performance and accomplishments. Badges are of types - course-level and assignment-level. Badges can be pre-selected while creating an assignment and automatically triggered when student finished the assignment or assignment is closed. Badges can also be awarded manually by instructor to an individual or a team. An instructor can also create new badges anytime and award to students. A leaderboard gives an account of standing of students in terms of badges earned. In order to implement a badging system, a third party badge manager will be utilized called Credly. Credly provides a way for users to accumulate and display badges they earn in a centralized way. By utilizing Credly, the development of the actual badges and badge management can be abstracted away from the project.&lt;br /&gt;
&lt;br /&gt;
The testing of these requirements will use Rspec testing framework for all non-user interface related modifications. All user-interface modifications resulting from the user requirements will be tested manually.&lt;br /&gt;
&lt;br /&gt;
===Use Case===&lt;br /&gt;
The following simple illustration shows the use cases of the system.&lt;br /&gt;
&lt;br /&gt;
[[File:Use_case.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Use Case Scenarios====&lt;br /&gt;
* '''Student Views Leaderboard'''&lt;br /&gt;
** Actor: Student&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Mouse over Home&lt;br /&gt;
**# Select Leaderboard &lt;br /&gt;
* '''Instructor Views Assignment Leaderboard'''&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select Assignments&lt;br /&gt;
**# Select View Badges on assignment&lt;br /&gt;
* '''Instructor Edits Assignment Badges'''&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select Assignments&lt;br /&gt;
**# Select Edit Assignments&lt;br /&gt;
**# Select Badges tab&lt;br /&gt;
**# Check enable badges&lt;br /&gt;
**# Check Score Threshold&lt;br /&gt;
**# Enter 95.5 as scoring threshold&lt;br /&gt;
**# Select Save&lt;br /&gt;
* '''Instructor Creates Course Badges'''&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select LeaderBoard&lt;br /&gt;
**# Select Award Badges&lt;br /&gt;
**# Select Create new badge&lt;br /&gt;
**# Create new badge using Credly&lt;br /&gt;
**# Select Save&lt;br /&gt;
&lt;br /&gt;
===Tasks Done===&lt;br /&gt;
*Create db table to store the participants with badges.&lt;br /&gt;
*Write code for calling the service and calculating/identifying badges based on the scores of students on all assignments.&lt;br /&gt;
*Add badge specification to course details and assignment details page for the instructor to specify the badges.&lt;br /&gt;
*Create views for both students and instructors. Students should be able to view their badges from different courses and instructors should be able to see the badges awarded/earned for their class.&lt;br /&gt;
*Display a subset of the badge holders on the leaderboard page. Also, student can view badges of other students in the course.&lt;br /&gt;
*Criteria to be followed for awarding badges:&lt;br /&gt;
#Top scores for an assignment. (configured at assignment page)&lt;br /&gt;
#All scores more than a threshold for an assignment. (configured at assignment page)&lt;br /&gt;
#Mean score of selected assignments being greater than threshold. (configured at course page)&lt;br /&gt;
#Top mean score of selected assignments. (configured at course page)&lt;br /&gt;
#Discretionary merit badges for projects that exceed expectations.&lt;br /&gt;
&lt;br /&gt;
===Files Used===&lt;br /&gt;
Files that are modified or are added can be found [http://github.com/expertiza/expertiza/pull/673/files here]&lt;br /&gt;
&lt;br /&gt;
*Modified files:&lt;br /&gt;
**app/controllers/student_task_controller.rb  4&lt;br /&gt;
**app/controllers/users_controller.rb  4&lt;br /&gt;
**app/controllers/tree_display_controller.rb   4&lt;br /&gt;
**app/controllers/leaderboard_controller.rb    4&lt;br /&gt;
**app/controllers/assignments_controller.rb   4&lt;br /&gt;
**app/models/user.rb  4&lt;br /&gt;
**app/models/leaderboard.rb  4&lt;br /&gt;
**app/models/badge_user.rb   4&lt;br /&gt;
**app/models/assignment_form.rb   4&lt;br /&gt;
**app/models/assignment.rb   4&lt;br /&gt;
**app/views/leaderboard/index.html.erb  4&lt;br /&gt;
**app/views/leaderboard/_leaderBoards.html.erb  4&lt;br /&gt;
**app/views/leaderboard/_achievementLeaderBoards.html.erb&lt;br /&gt;
**app/views/course/edit.html.erb&lt;br /&gt;
**app/views/tree_display/actions/_courses_actions.html.erb  4&lt;br /&gt;
**config/routes.rb  4&lt;br /&gt;
**db/schema.rb  4&lt;br /&gt;
**app/views/leaderboard/view.html.erb  4&lt;br /&gt;
**app/views/auth/_login.html.erb   4&lt;br /&gt;
**app/views/assignments/edit.html.erb   4&lt;br /&gt;
**app/helpers/leaderboard_helper.rb   4&lt;br /&gt;
**app/helpers/assignment_helper.rb    4&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Newly added files:&lt;br /&gt;
**app/models/badge.rb   4&lt;br /&gt;
**app/models/badge_groups.rb  4&lt;br /&gt;
**app/models/assignment_group.rb  4&lt;br /&gt;
**app/controllers/badges_controller.rb  4&lt;br /&gt;
**app/controllers/badge_groups_controller.rb   4&lt;br /&gt;
**app/views/users/credly_register.html.erb  4&lt;br /&gt;
**app/views/assignments/edit/_badges.html.erb  4&lt;br /&gt;
**app/views/badges/   4&lt;br /&gt;
**app/views/badge_groups/   4&lt;br /&gt;
**app/views/assignments/edit/_select_badge.html.erb  4&lt;br /&gt;
**app/helpers/credly_helper.rb  4&lt;br /&gt;
&lt;br /&gt;
===Deciding External Web Service===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Factors !! Open Badges !! Credly !! Bestr&lt;br /&gt;
|-&lt;br /&gt;
| Native User Management || No || Yes. No need to store all records locally. || No&lt;br /&gt;
|-&lt;br /&gt;
| Extensive API Support || Yes. But many still in beta phase. || Yes. (Primary reason for choosing Credly) || No&lt;br /&gt;
|-&lt;br /&gt;
| Interactive Badge Builder SDK|| Yes. But still in beta phase. || Yes || Yes. But gives few options for cusromization.&lt;br /&gt;
|-&lt;br /&gt;
| Existing Integration with other systems || Few || Many || No&lt;br /&gt;
|-&lt;br /&gt;
| Monetary Costs || Free || Free tier as well as paid plans. || Paid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
From the above rubrics, we decided to use Credly as our web service for badging system.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
The following tables will be created to implement a solution for this project.&lt;br /&gt;
&lt;br /&gt;
1. badges table - which stores badge_id and their descriptions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| name || varchar || Description of the badge&lt;br /&gt;
|-&lt;br /&gt;
| credly_badge_id || int || Corresponding badge id with Credly&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. badge_users table - which stores details about what badges are assignment to a user and related details.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Referenced from badges table&lt;br /&gt;
|-&lt;br /&gt;
| user_id || int || Referenced from users table&lt;br /&gt;
|-&lt;br /&gt;
| course_id || int || Referenced from courses table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|-&lt;br /&gt;
| is_course_badge || boolean || Whether badge is a course-badge or individual-badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
3. badge_groups - which stores information about which badges should be assigned depending on the threshold score.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| strategy || varchar || Describes the strategy of awarding&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Assigned badge id.&lt;br /&gt;
|-&lt;br /&gt;
| course_id || int || Course for which group is formed.&lt;br /&gt;
|-&lt;br /&gt;
| is_course_level_group || boolean || Whether group is for course &lt;br /&gt;
|-&lt;br /&gt;
| threshold || int || Score required to award the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
4. assignment_groups - which stores details about the team badges.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Referenced from badge_groups table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
# MVC – The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
# DRY Principle – We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design==&lt;br /&gt;
As with most Ruby on Rails applications, this solution uses the Model-View-Controller&lt;br /&gt;
design pattern. The following diagram shows a workflow of the planned design along with the attributes and operations that are&lt;br /&gt;
relevant to the implementation of this solution.&lt;br /&gt;
&lt;br /&gt;
[[File:badging_class_diagram.png]]&lt;br /&gt;
&lt;br /&gt;
==Walkthrough==&lt;br /&gt;
Below is a walkthrough of the changes to implement the Badging System:&lt;br /&gt;
===Instructor===&lt;br /&gt;
Instructors may configure badges on the course page using the new badge configuration icon:&lt;br /&gt;
&lt;br /&gt;
[[File:Manage_courses_badges.jpg]]&lt;br /&gt;
&lt;br /&gt;
Upon clicking the badge configuration icon, the user will be presented with two items: create groups and view all existing groups. Users may also edit and delete groups. A group is a set of assignments to present badges for.&lt;br /&gt;
&lt;br /&gt;
[[File:badges_configuration.jpg]]&lt;br /&gt;
&lt;br /&gt;
A new group may be created using the form below. This form allows instructors to create a new badge while creating a group for which they will be redirected to Credly. The form page must be refreshed upon creating a new badge so it may appear in the interface. The result of this form will create a new record in badge_groups and assignment_groups tables. &lt;br /&gt;
&lt;br /&gt;
[[File:badges_new.jpg]]&lt;br /&gt;
&lt;br /&gt;
Under assignment configuration, instructors may add badges to an individual assignment. They may choose to add the badges to the top N students, or based off of a given threshold. In order to see the previously mentioned strategies, Enable Badges must be checked. When enabling badges, it will create data in the badges_group and assignments_group tables. &lt;br /&gt;
&lt;br /&gt;
[[File:assignment_badges_config.jpg]]&lt;br /&gt;
&lt;br /&gt;
After badges are awarded, an instructor may view the badges given to students on the leaderboard page. On the leaderboard page each course has it's own board of students. Instructors may also manually award badges to students from the page. &lt;br /&gt;
&lt;br /&gt;
[[File:leaderboard_instructor.jpg]]&lt;br /&gt;
&lt;br /&gt;
Upon clicking award badge you will be brought to a form, which contains the student, the badge and the assignment. After submitting the form a badge will be awarded to the student by creating an entry in the badges_users table. &lt;br /&gt;
&lt;br /&gt;
[[File:award_badges.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Student===&lt;br /&gt;
Students may view the leaderboard for classes they have taken. They may see where they place among their peers. &lt;br /&gt;
&lt;br /&gt;
[[File:student_leaderboard.png]]&lt;br /&gt;
&lt;br /&gt;
==Mockups==&lt;br /&gt;
The Expertiza badging system will largely be driven by academic achievement from students. By using student’s scores as a way to provide badges it will be easy to automate the badge reward system upon closing an assignment. For instance, an instructor may decide to reward badges to the top 3 scores on an assignment so once the assignment closes those students will automatically be given those badges. &lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must turn on badging for their assignment upon creating or editing an assignment. When turning on the badging system the instructor may specify how many badges will be distributed, or choose to distribute them based off of a scoring threshold that students must achieve. &lt;br /&gt;
&lt;br /&gt;
Following the completion of an assignment an instructor may view the awarded badges on the assignment page. A student will be able to view their earned badges on their homepage categorized by course and assignment. &lt;br /&gt;
&lt;br /&gt;
The layout of each page will match with the currently existing design standards in Expertiza we will continue to use the header and will use headings and links much like other pages. Figure 1 below shows what the leaderboard may look like from a student perspective. Each course the student has participated in will be displayed on the page and by clicking the “Show Badges” the page will generate a list of each of the participants sorted by the number of badges they have earned. In order to display the badges the application will make a call to Credly to query about student badges.&lt;br /&gt;
&lt;br /&gt;
[[File: StudentLeaderboard.png]]&lt;br /&gt;
Figure 1: Student Leaderboard&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next figures are all from the perspective of an inspector or admin. In Figure 3 below an instructor may view the badges earned for a given assignment or course in which they own. They will get to his page by clicking a badges button from either the assignments or courses page. The title of the page will be the name of either the course of assignment. Like the previous figure, by clicking show badges the list of course participants will appear sorted by the number of badges they have earned. Another link, “Award Badges” will be used to manually grant a badge. When an instructor or admin clicks on the link, they will be directed to the credly page in order to grant the badge to the student.  &lt;br /&gt;
&lt;br /&gt;
[[File: InstructorAssignment.png]]&lt;br /&gt;
Figure 2: Instructor assignment / course badge view&lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must first enable them for the assignment. The badges will be enabled by default. The figure below shows some of the settings associated with the badges system. Instructors may choose to automatically grant badges to students based off of their performance on the assignment. When editing or creating a new assignment they may come to the new badges tab and configure how they want the badges granted. Instructors may choose to grant some number of badges to the top scores of the group defined by the number the input, or they may decide to grant badges to anyone who may achieve a score past the provided scoring threshold. &lt;br /&gt;
&lt;br /&gt;
[[File: EditAssignmentBadges.png]]&lt;br /&gt;
Figure 3: Assignment Badge Settings&lt;br /&gt;
&lt;br /&gt;
Like assignments, courses also need to have some settings to configure badges. In Figure 4, instructors may automatically grant badges for students based on mean scores of multiple assignments throughout the course. First the instructor must check all of the assignments they would like to include in the mean then they must select a scoring strategy. Like the previous figure, they may choose between granting a badge to the top number of participants based on instructor input, or they may set a threshold on a mean score and any student who has achieved a score past the mean will be granted a badge. &lt;br /&gt;
&lt;br /&gt;
[[File: BadgeCourseOptions.png]]&lt;br /&gt;
Figure 4: Edit Course&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_leaderboard.png&amp;diff=102297</id>
		<title>File:Student leaderboard.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_leaderboard.png&amp;diff=102297"/>
		<updated>2016-04-25T22:32:31Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Award_badges.jpg&amp;diff=102296</id>
		<title>File:Award badges.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Award_badges.jpg&amp;diff=102296"/>
		<updated>2016-04-25T22:28:40Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Leaderboard_instructor.jpg&amp;diff=102295</id>
		<title>File:Leaderboard instructor.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Leaderboard_instructor.jpg&amp;diff=102295"/>
		<updated>2016-04-25T22:25:16Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Assignment_badges_config.jpg&amp;diff=102294</id>
		<title>File:Assignment badges config.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Assignment_badges_config.jpg&amp;diff=102294"/>
		<updated>2016-04-25T22:19:17Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102290</id>
		<title>CSC/ECE 517 Spring 2016/Badging System</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102290"/>
		<updated>2016-04-25T14:15:55Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Started screenshot walkthrough&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
===Background===&lt;br /&gt;
Much like physical badges in the army and youth scout troops, digital badges are an assessment and credentialing mechanism that is housed and managed online. Badges are designed to make visible and validate learning in both formal and informal settings, and hold the potential to help transform where and how learning is valued. In other words, badges may be used in order to set goals and motivations for students and reward and may help to improve their academic scores. Badges can also be considered as a way to reward student’s success. Moreover, badges can be used by teachers for alternative assessment techniques.&lt;br /&gt;
&lt;br /&gt;
===Purpose===&lt;br /&gt;
One request for the Expertiza system is to add a badging system as a way to measure student performance. Expertiza will take advantage of the motivations created from badges by awarding students with new badges based off providing a variety of factors within the Expertiza system. Some of these badges include: achieving a top percentage of scores in an assignment, achieving a high peer review score, performing well overall in a course and other manual accomplishments deemed necessary by the teaching staff for a course. Instead of implementing the whole badging system, we will call an existing online badging web service, Credly, and integrate it with Expertiza. Instructor can create badges using this service and assign to students.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
===System Requirements===&lt;br /&gt;
The system requirements focuses on adding a 'badging' functionality in Expertiza. This feature allows instructors to assign badges to students based on their performance and accomplishments. Badges are of types - course-level and assignment-level. Badges can be pre-selected while creating an assignment and automatically triggered when student finished the assignment or assignment is closed. Badges can also be awarded manually by instructor to an individual or a team. An instructor can also create new badges anytime and award to students. A leaderboard gives an account of standing of students in terms of badges earned. In order to implement a badging system, a third party badge manager will be utilized called Credly. Credly provides a way for users to accumulate and display badges they earn in a centralized way. By utilizing Credly, the development of the actual badges and badge management can be abstracted away from the project.&lt;br /&gt;
&lt;br /&gt;
The testing of these requirements will use Rspec testing framework for all non-user interface related modifications. All user-interface modifications resulting from the user requirements will be tested manually.&lt;br /&gt;
&lt;br /&gt;
===Use Case===&lt;br /&gt;
The following simple illustration shows the use cases of the system.&lt;br /&gt;
&lt;br /&gt;
[[File:Use_case.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Use Case Scenarios====&lt;br /&gt;
* '''Student Views Leaderboard'''&lt;br /&gt;
** Actor: Student&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Mouse over Home&lt;br /&gt;
**# Select Leaderboard &lt;br /&gt;
* '''Instructor Views Assignment Leaderboard'''&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select Assignments&lt;br /&gt;
**# Select View Badges on assignment&lt;br /&gt;
* '''Instructor Edits Assignment Badges'''&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select Assignments&lt;br /&gt;
**# Select Edit Assignments&lt;br /&gt;
**# Select Badges tab&lt;br /&gt;
**# Check enable badges&lt;br /&gt;
**# Check Score Threshold&lt;br /&gt;
**# Enter 95.5 as scoring threshold&lt;br /&gt;
**# Select Save&lt;br /&gt;
* '''Instructor Creates Course Badges'''&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select LeaderBoard&lt;br /&gt;
**# Select Award Badges&lt;br /&gt;
**# Select Create new badge&lt;br /&gt;
**# Create new badge using Credly&lt;br /&gt;
**# Select Save&lt;br /&gt;
&lt;br /&gt;
===Tasks To Do===&lt;br /&gt;
*Create db table to store the participants with badges.&lt;br /&gt;
*Write code for calling the service and calculating/identifying badges based on the scores of students on all assignments.&lt;br /&gt;
*Add badge specification to course details and assignment details page for the instructor to specify the badges.&lt;br /&gt;
*Create views for both students and instructors. Students should be able to view their badges from different courses and instructors should be able to see the badges awarded/earned for their class.&lt;br /&gt;
*Display a subset of the badge holders on the leaderboard page. Also, student can view badges of other students in the course.&lt;br /&gt;
*Criteria to be followed for awarding badges:&lt;br /&gt;
#Top scores for an assignment. (configured at assignment page)&lt;br /&gt;
#All scores more than a threshold for an assignment. (configured at assignment page)&lt;br /&gt;
#Mean score of selected assignments being greater than threshold. (configured at course page)&lt;br /&gt;
#Top mean score of selected assignments. (configured at course page)&lt;br /&gt;
#Discretionary merit badges for projects that exceed expectations.&lt;br /&gt;
&lt;br /&gt;
===Files Identified===&lt;br /&gt;
*Modified files:&lt;br /&gt;
**app/controllers/student_task_controller.rb&lt;br /&gt;
**app/controllers/users_controller.rb&lt;br /&gt;
**app/models/user.rb&lt;br /&gt;
**app/views/leaderboard/index.html.erb&lt;br /&gt;
**app/views/leaderboard/_top3LeaderBoards.html.erb&lt;br /&gt;
**app/views/leaderboard/_achievementLeaderBoards.html.erb&lt;br /&gt;
**app/views/course/edit.html.erb&lt;br /&gt;
**config/routes.rb&lt;br /&gt;
&lt;br /&gt;
*Newly added files:&lt;br /&gt;
**app/models/badges.rb&lt;br /&gt;
**app/models/badge_groups.rb&lt;br /&gt;
**app/controllers/badges_controller.rb&lt;br /&gt;
**app/controllers/badge_groups_controller.rb&lt;br /&gt;
**app/views/users/credly_register.html.erb&lt;br /&gt;
**app/views/assignments/edit/_badges_configuration.html.erb&lt;br /&gt;
**app/views/badges/&lt;br /&gt;
&lt;br /&gt;
===Deciding External Web Service===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Factors !! Open Badges !! Credly !! Bestr&lt;br /&gt;
|-&lt;br /&gt;
| Native User Management || No || Yes. No need to store all records locally. || No&lt;br /&gt;
|-&lt;br /&gt;
| Extensive API Support || Yes. But many still in beta phase. || Yes. (Primary reason for choosing Credly) || No&lt;br /&gt;
|-&lt;br /&gt;
| Interactive Badge Builder SDK|| Yes. But still in beta phase. || Yes || Yes. But gives few options for cusromization.&lt;br /&gt;
|-&lt;br /&gt;
| Existing Integration with other systems || Few || Many || No&lt;br /&gt;
|-&lt;br /&gt;
| Monetary Costs || Free || Free tier as well as paid plans. || Paid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
From the above rubrics, we decided to use Credly as our web service for badging system.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
The following tables will be created to implement a solution for this project.&lt;br /&gt;
&lt;br /&gt;
1. badges table - which stores badge_id and their descriptions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| name || varchar || Description of the badge&lt;br /&gt;
|-&lt;br /&gt;
| credly_badge_id || int || Corresponding badge id with Credly&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. badge_users table - which stores details about what badges are assignment to a user and related details.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Referenced from badges table&lt;br /&gt;
|-&lt;br /&gt;
| user_id || int || Referenced from users table&lt;br /&gt;
|-&lt;br /&gt;
| course_id || int || Referenced from courses table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|-&lt;br /&gt;
| is_course_badge || boolean || Whether badge is a course-badge or individual-badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
3. badge_groups - which stores information about which badges should be assigned depending on the threshold score.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| strategy || varchar || Describes the strategy of awarding&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Assigned badge id.&lt;br /&gt;
|-&lt;br /&gt;
| course_id || int || Course for which group is formed.&lt;br /&gt;
|-&lt;br /&gt;
| is_course_level_group || boolean || Whether group is for course &lt;br /&gt;
|-&lt;br /&gt;
| threshold || int || Score required to award the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
4. assignment_groups - which stores details about the team badges.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Referenced from badge_groups table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
# MVC – The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
# DRY Principle – We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design==&lt;br /&gt;
As with most Ruby on Rails applications, this solution uses the Model-View-Controller&lt;br /&gt;
design pattern. The following diagram shows a workflow of the planned design along with the attributes and operations that are&lt;br /&gt;
relevant to the implementation of this solution.&lt;br /&gt;
&lt;br /&gt;
[[File:badging_class_diagram.png]]&lt;br /&gt;
&lt;br /&gt;
==Walkthrough==&lt;br /&gt;
Below is a walkthrough of the changes to implement the Badging System:&lt;br /&gt;
===Instructor===&lt;br /&gt;
Instructors may configure badges on the course page using the new badge configuration icon:&lt;br /&gt;
&lt;br /&gt;
[[File:Manage_courses_badges.jpg]]&lt;br /&gt;
&lt;br /&gt;
Upon clicking the badge configuration icon, the user will be presented with two items: create groups and view all existing groups. Users may also edit and delete groups. A group is a set of assignments to present badges for.&lt;br /&gt;
&lt;br /&gt;
[[File:badges_configuration.jpg]]&lt;br /&gt;
&lt;br /&gt;
A new group may be created using the form below. This form allows instructors to create a new badge while creating a group for which they will be redirected to Credly. The form page must be refreshed upon creating a new badge so it may appear in the interface. The result of this form will create a new record in badge_groups and assignment_groups tables. &lt;br /&gt;
&lt;br /&gt;
[[File:badges_new.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Mockups==&lt;br /&gt;
The Expertiza badging system will largely be driven by academic achievement from students. By using student’s scores as a way to provide badges it will be easy to automate the badge reward system upon closing an assignment. For instance, an instructor may decide to reward badges to the top 3 scores on an assignment so once the assignment closes those students will automatically be given those badges. &lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must turn on badging for their assignment upon creating or editing an assignment. When turning on the badging system the instructor may specify how many badges will be distributed, or choose to distribute them based off of a scoring threshold that students must achieve. &lt;br /&gt;
&lt;br /&gt;
Following the completion of an assignment an instructor may view the awarded badges on the assignment page. A student will be able to view their earned badges on their homepage categorized by course and assignment. &lt;br /&gt;
&lt;br /&gt;
The layout of each page will match with the currently existing design standards in Expertiza we will continue to use the header and will use headings and links much like other pages. Figure 1 below shows what the leaderboard may look like from a student perspective. Each course the student has participated in will be displayed on the page and by clicking the “Show Badges” the page will generate a list of each of the participants sorted by the number of badges they have earned. In order to display the badges the application will make a call to Credly to query about student badges.&lt;br /&gt;
&lt;br /&gt;
[[File: StudentLeaderboard.png]]&lt;br /&gt;
Figure 1: Student Leaderboard&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next figures are all from the perspective of an inspector or admin. In Figure 3 below an instructor may view the badges earned for a given assignment or course in which they own. They will get to his page by clicking a badges button from either the assignments or courses page. The title of the page will be the name of either the course of assignment. Like the previous figure, by clicking show badges the list of course participants will appear sorted by the number of badges they have earned. Another link, “Award Badges” will be used to manually grant a badge. When an instructor or admin clicks on the link, they will be directed to the credly page in order to grant the badge to the student.  &lt;br /&gt;
&lt;br /&gt;
[[File: InstructorAssignment.png]]&lt;br /&gt;
Figure 2: Instructor assignment / course badge view&lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must first enable them for the assignment. The badges will be enabled by default. The figure below shows some of the settings associated with the badges system. Instructors may choose to automatically grant badges to students based off of their performance on the assignment. When editing or creating a new assignment they may come to the new badges tab and configure how they want the badges granted. Instructors may choose to grant some number of badges to the top scores of the group defined by the number the input, or they may decide to grant badges to anyone who may achieve a score past the provided scoring threshold. &lt;br /&gt;
&lt;br /&gt;
[[File: EditAssignmentBadges.png]]&lt;br /&gt;
Figure 3: Assignment Badge Settings&lt;br /&gt;
&lt;br /&gt;
Like assignments, courses also need to have some settings to configure badges. In Figure 4, instructors may automatically grant badges for students based on mean scores of multiple assignments throughout the course. First the instructor must check all of the assignments they would like to include in the mean then they must select a scoring strategy. Like the previous figure, they may choose between granting a badge to the top number of participants based on instructor input, or they may set a threshold on a mean score and any student who has achieved a score past the mean will be granted a badge. &lt;br /&gt;
&lt;br /&gt;
[[File: BadgeCourseOptions.png]]&lt;br /&gt;
Figure 4: Edit Course&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Badges_new.jpg&amp;diff=102289</id>
		<title>File:Badges new.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Badges_new.jpg&amp;diff=102289"/>
		<updated>2016-04-25T14:14:32Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Badges_configuration.jpg&amp;diff=102288</id>
		<title>File:Badges configuration.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Badges_configuration.jpg&amp;diff=102288"/>
		<updated>2016-04-25T14:09:43Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Manage_courses_badges.jpg&amp;diff=102287</id>
		<title>File:Manage courses badges.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Manage_courses_badges.jpg&amp;diff=102287"/>
		<updated>2016-04-25T14:06:21Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Course page for badges&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Course page for badges&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102148</id>
		<title>CSC/ECE 517 Spring 2016/Badging System</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102148"/>
		<updated>2016-04-11T22:01:30Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: /* Mockups */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
===Background===&lt;br /&gt;
Much like physical badges in the army and youth scout troops, digital badges are an assessment and credentialing mechanism that is housed and managed online. Badges are designed to make visible and validate learning in both formal and informal settings, and hold the potential to help transform where and how learning is valued. In other words, badges may be used in order to set goals and motivations for students and reward and may help to improve their academic scores. Badges can also be considered as a way to reward student’s success. Moreover, badges can be used by teachers for alternative assessment techniques.&lt;br /&gt;
&lt;br /&gt;
===Purpose===&lt;br /&gt;
One request for the Expertiza system is to add a badging system as a way to measure student performance. Expertiza will take advantage of the motivations created from badges by awarding students with new badges based off providing a variety of factors within the Expertiza system. Some of these badges include: achieving a top percentage of scores in an assignment, achieving a high peer review score, performing well overall in a course and other manual accomplishments deemed necessary by the teaching staff for a course. Instead of implementing the whole badging system, we will call an existing online badging web service, Credly, and integrate it with Expertiza.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
===System Requirements===&lt;br /&gt;
The system requirements focuses on adding a 'badging' functionality in Expertiza. This feature allows instructors to assign badges to students based on their performance and accomplishments. Badges are of types - course-level and assignment-level. Badges can be pre-selected while creating an assignment and automatically triggered when student finished the assignment or assignment is closed. Badges can also be awarded manually by instructor to an individual or a team. A leaderboard gives an account of standing of students in terms of badges earned. In order to implement a badging system, a third party badge manager will be utilized called Credly. Credly provides a way for users to accumulate and display badges they earn in a centralized way. By utilizing Credly, the development of the actual badges and badge management can be abstracted away from the project.&lt;br /&gt;
&lt;br /&gt;
The testing of these requirements will use Rspec testing framework for all non-user interface related modifications. All user-interface modifications resulting from the user requirements will be tested manually.&lt;br /&gt;
===Use Case===&lt;br /&gt;
The following simple illustration shows the use cases of the system.&lt;br /&gt;
&lt;br /&gt;
[[File:Use_case.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Use Cases====&lt;br /&gt;
* '''Student Views Leaderboard'''&lt;br /&gt;
** Actor: Student&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Mouse over Home&lt;br /&gt;
**# Select Leaderboard &lt;br /&gt;
* '''Instructor Views Assignment Leaderboard'''&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select Assignments&lt;br /&gt;
**# Select View Badges on assignment&lt;br /&gt;
* '''Instructor Edits Assignment Badges'''&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select Assignments&lt;br /&gt;
**# Select Edit Assignments&lt;br /&gt;
**# Select Badges tab&lt;br /&gt;
**# Check enable badges&lt;br /&gt;
* '''Instructor Creates Course Badges'''&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select Courses&lt;br /&gt;
**# Select Edit Badges&lt;br /&gt;
**# Check assignments&lt;br /&gt;
**# Check Score Threshold&lt;br /&gt;
**# Enter 95.5 as scoring threshold&lt;br /&gt;
**# Select Submit&lt;br /&gt;
&lt;br /&gt;
===Tasks To Do===&lt;br /&gt;
*Create db table to store the participants with badges.&lt;br /&gt;
*Write code for calling the service and calculating/identifying badges based on the scores of students on all assignments.&lt;br /&gt;
*Add badge specification to course details and assignment details page for the instructor to specify the badges.&lt;br /&gt;
*Create views for both students and instructors. Students should be able to view their badges from different courses and instructors should be able to see the badges awarded/earned for their class.&lt;br /&gt;
*Display a subset of the badge holders on the leaderboard page. Also, student can view badges of other students in the course.&lt;br /&gt;
*Criteria to be followed for awarding badges:&lt;br /&gt;
#Top scores for an assignment. (configured at assignment page)&lt;br /&gt;
#All scores more than a threshold for an assignment. (configured at assignment page)&lt;br /&gt;
#Mean score of selected assignments being greater than threshold. (configured at course page)&lt;br /&gt;
#Top mean score of selected assignments. (configured at course page)&lt;br /&gt;
#Discretionary merit badges for projects that exceed expectations.&lt;br /&gt;
&lt;br /&gt;
===Files Identified===&lt;br /&gt;
Associated files goes here.&lt;br /&gt;
&lt;br /&gt;
===Deciding External Web Service===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Factors !! Open Badges !! Credly !! Bestr&lt;br /&gt;
|-&lt;br /&gt;
| Native User Management || No || Yes. No need to store all records locally. || No&lt;br /&gt;
|-&lt;br /&gt;
| Extensive API Support || Yes. But many still in beta phase. || Yes. (Primary reason for choosing Credly) || No&lt;br /&gt;
|-&lt;br /&gt;
| Interactive Badge Builder SDK|| Yes. But still in beta phase. || Yes || Yes. But gives few options for cusromization.&lt;br /&gt;
|-&lt;br /&gt;
| Existing Integration with other systems || Few || Many || No&lt;br /&gt;
|-&lt;br /&gt;
| Monetary Costs || Free || Free tier as well as paid plans. || Paid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
From the above rubrics, we decided to use Credly as our web service for badging system.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
The following tables will be created to implement a solution for this project.&lt;br /&gt;
&lt;br /&gt;
1. badges table - which stores badge_id and their descriptions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Description of the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. badge_users table - which stores details about what badges are assignment to a user and related details.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_user_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Referenced from badges table&lt;br /&gt;
|-&lt;br /&gt;
| user_id || int || Referenced from users table&lt;br /&gt;
|-&lt;br /&gt;
| course_id || int || Referenced from courses table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|-&lt;br /&gt;
| is_course_badge || boolean || Whether badge is a course-badge or individual-badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
3. badge_groups - which stores information about which badges should be assigned depending on the threshold score.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| strategy || string || Describes the strategy of awarding&lt;br /&gt;
|-&lt;br /&gt;
| threshold || int || Score required to award the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
4. assignment_groups - which stores details about the team badges.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| assignment_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Referenced from badge_groups table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
# MVC – The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
# DRY Principle – We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design==&lt;br /&gt;
As with most Ruby on Rails applications, this solution uses the Model-View-Controller&lt;br /&gt;
design pattern. The following diagram shows a workflow of the planned design along with the attributes and operations that are&lt;br /&gt;
relevant to the implementation of this solution.&lt;br /&gt;
&lt;br /&gt;
[[File:Cap1.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Mockups==&lt;br /&gt;
The Expertiza badging system will largely be driven by academic achievement from students. By using student’s scores as a way to provide badges it will be easy to automate the badge reward system upon closing an assignment. For instance, an instructor may decide to reward badges to the top 3 scores on an assignment so once the assignment closes those students will automatically be given those badges. &lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must turn on badging for their assignment upon creating or editing an assignment. When turning on the badging system the instructor may specify how many badges will be distributed, or choose to distribute them based off of a scoring threshold that students must achieve. &lt;br /&gt;
&lt;br /&gt;
Following the completion of an assignment an instructor may view the awarded badges on the assignment page. A student will be able to view their earned badges on their homepage categorized by course and assignment. &lt;br /&gt;
. &lt;br /&gt;
The layout of each page will match with the currently existing design standards in Expertiza we will continue to use the header and will use headings and links much like other pages. Figure 1 below shows what the leaderboard may look like from a student perspective. Each course the student has participated in will be displayed on the page and by clicking the “Show Badges” the page will generate a list of each of the participants sorted by the number of badges they have earned. In order to display the badges the application will make a call to Credly to query about student badges.&lt;br /&gt;
&lt;br /&gt;
[[File: StudentLeaderboard.png]]&lt;br /&gt;
Figure 1: Student Leaderboard&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next figures are all from the perspective of an inspector or admin. In Figure 3 below an instructor may view the badges earned for a given assignment or course in which they own. They will get to his page by clicking a badges button from either the assignments or courses page. The title of the page will be the name of either the course of assignment. Like the previous figure, by clicking show badges the list of course participants will appear sorted by the number of badges they have earned. Another link, “Award Badges” will be used to manually grant a badge. When an instructor or admin clicks on the link, they will be directed to the credly page in order to grant the badge to the student.  &lt;br /&gt;
&lt;br /&gt;
[[File: InstructorAssignment.png]]&lt;br /&gt;
Figure 2: Instructor assignment / course badge view&lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must first enable them for the assignment. The badges will be enabled by default. The figure below shows some of the settings associated with the badges system. Instructors may choose to automatically grant badges to students based off of their performance on the assignment. When editing or creating a new assignment they may come to the new badges tab and configure how they want the badges granted. Instructors may choose to grant some number of badges to the top scores of the group defined by the number the input, or they may decide to grant badges to anyone who may achieve a score past the provided scoring threshold. &lt;br /&gt;
&lt;br /&gt;
[[File: EditAssignmentBadges.png]]&lt;br /&gt;
Figure 3: Assignment Badge Settings&lt;br /&gt;
&lt;br /&gt;
Like assignments, courses also need to have some settings to configure badges. In Figure 4, instructors may automatically grant badges for students based on mean scores of multiple assignments throughout the course. First the instructor must check all of the assignments they would like to include in the mean then they must select a scoring strategy. Like the previous figure, they may choose between granting a badge to the top number of participants based on instructor input, or they may set a threshold on a mean score and any student who has achieved a score past the mean will be granted a badge. &lt;br /&gt;
&lt;br /&gt;
[[File: BadgeCourseOptions.png]]&lt;br /&gt;
Figure 4: Edit Course&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102147</id>
		<title>CSC/ECE 517 Spring 2016/Badging System</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102147"/>
		<updated>2016-04-11T21:59:56Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
===Background===&lt;br /&gt;
Much like physical badges in the army and youth scout troops, digital badges are an assessment and credentialing mechanism that is housed and managed online. Badges are designed to make visible and validate learning in both formal and informal settings, and hold the potential to help transform where and how learning is valued. In other words, badges may be used in order to set goals and motivations for students and reward and may help to improve their academic scores. Badges can also be considered as a way to reward student’s success. Moreover, badges can be used by teachers for alternative assessment techniques.&lt;br /&gt;
&lt;br /&gt;
===Purpose===&lt;br /&gt;
One request for the Expertiza system is to add a badging system as a way to measure student performance. Expertiza will take advantage of the motivations created from badges by awarding students with new badges based off providing a variety of factors within the Expertiza system. Some of these badges include: achieving a top percentage of scores in an assignment, achieving a high peer review score, performing well overall in a course and other manual accomplishments deemed necessary by the teaching staff for a course. Instead of implementing the whole badging system, we will call an existing online badging web service, Credly, and integrate it with Expertiza.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
===System Requirements===&lt;br /&gt;
The system requirements focuses on adding a 'badging' functionality in Expertiza. This feature allows instructors to assign badges to students based on their performance and accomplishments. Badges are of types - course-level and assignment-level. Badges can be pre-selected while creating an assignment and automatically triggered when student finished the assignment or assignment is closed. Badges can also be awarded manually by instructor to an individual or a team. A leaderboard gives an account of standing of students in terms of badges earned. In order to implement a badging system, a third party badge manager will be utilized called Credly. Credly provides a way for users to accumulate and display badges they earn in a centralized way. By utilizing Credly, the development of the actual badges and badge management can be abstracted away from the project.&lt;br /&gt;
&lt;br /&gt;
The testing of these requirements will use Rspec testing framework for all non-user interface related modifications. All user-interface modifications resulting from the user requirements will be tested manually.&lt;br /&gt;
===Use Case===&lt;br /&gt;
The following simple illustration shows the use cases of the system.&lt;br /&gt;
&lt;br /&gt;
[[File:Use_case.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Use Cases====&lt;br /&gt;
* '''Student Views Leaderboard'''&lt;br /&gt;
** Actor: Student&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Mouse over Home&lt;br /&gt;
**# Select Leaderboard &lt;br /&gt;
* '''Instructor Views Assignment Leaderboard'''&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select Assignments&lt;br /&gt;
**# Select View Badges on assignment&lt;br /&gt;
* '''Instructor Edits Assignment Badges'''&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select Assignments&lt;br /&gt;
**# Select Edit Assignments&lt;br /&gt;
**# Select Badges tab&lt;br /&gt;
**# Check enable badges&lt;br /&gt;
* '''Instructor Creates Course Badges'''&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select Courses&lt;br /&gt;
**# Select Edit Badges&lt;br /&gt;
**# Check assignments&lt;br /&gt;
**# Check Score Threshold&lt;br /&gt;
**# Enter 95.5 as scoring threshold&lt;br /&gt;
**# Select Submit&lt;br /&gt;
&lt;br /&gt;
===Tasks To Do===&lt;br /&gt;
*Create db table to store the participants with badges.&lt;br /&gt;
*Write code for calling the service and calculating/identifying badges based on the scores of students on all assignments.&lt;br /&gt;
*Add badge specification to course details and assignment details page for the instructor to specify the badges.&lt;br /&gt;
*Create views for both students and instructors. Students should be able to view their badges from different courses and instructors should be able to see the badges awarded/earned for their class.&lt;br /&gt;
*Display a subset of the badge holders on the leaderboard page. Also, student can view badges of other students in the course.&lt;br /&gt;
*Criteria to be followed for awarding badges:&lt;br /&gt;
#Top scores for an assignment. (configured at assignment page)&lt;br /&gt;
#All scores more than a threshold for an assignment. (configured at assignment page)&lt;br /&gt;
#Mean score of selected assignments being greater than threshold. (configured at course page)&lt;br /&gt;
#Top mean score of selected assignments. (configured at course page)&lt;br /&gt;
#Discretionary merit badges for projects that exceed expectations.&lt;br /&gt;
&lt;br /&gt;
===Files Identified===&lt;br /&gt;
Associated files goes here.&lt;br /&gt;
&lt;br /&gt;
===Deciding External Web Service===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Factors !! Open Badges !! Credly !! Bestr&lt;br /&gt;
|-&lt;br /&gt;
| Native User Management || No || Yes. No need to store all records locally. || No&lt;br /&gt;
|-&lt;br /&gt;
| Extensive API Support || Yes. But many still in beta phase. || Yes. (Primary reason for choosing Credly) || No&lt;br /&gt;
|-&lt;br /&gt;
| Interactive Badge Builder SDK|| Yes. But still in beta phase. || Yes || Yes. But gives few options for cusromization.&lt;br /&gt;
|-&lt;br /&gt;
| Existing Integration with other systems || Few || Many || No&lt;br /&gt;
|-&lt;br /&gt;
| Monetary Costs || Free || Free tier as well as paid plans. || Paid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
From the above rubrics, we decided to use Credly as our web service for badging system.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
The following tables will be created to implement a solution for this project.&lt;br /&gt;
&lt;br /&gt;
1. badges table - which stores badge_id and their descriptions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Description of the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. badge_users table - which stores details about what badges are assignment to a user and related details.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_user_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Referenced from badges table&lt;br /&gt;
|-&lt;br /&gt;
| user_id || int || Referenced from users table&lt;br /&gt;
|-&lt;br /&gt;
| course_id || int || Referenced from courses table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|-&lt;br /&gt;
| is_course_badge || boolean || Whether badge is a course-badge or individual-badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
3. badge_groups - which stores information about which badges should be assigned depending on the threshold score.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| strategy || string || Describes the strategy of awarding&lt;br /&gt;
|-&lt;br /&gt;
| threshold || int || Score required to award the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
4. assignment_groups - which stores details about the team badges.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| assignment_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Referenced from badge_groups table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
# MVC – The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
# DRY Principle – We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design==&lt;br /&gt;
As with most Ruby on Rails applications, this solution uses the Model-View-Controller&lt;br /&gt;
design pattern. The following diagram shows a workflow of the planned design along with the attributes and operations that are&lt;br /&gt;
relevant to the implementation of this solution.&lt;br /&gt;
&lt;br /&gt;
[[File:Cap1.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Mockups==&lt;br /&gt;
The Expertiza badging system will largely be driven by academic achievement from students. By using student’s scores as a way to provide badges it will be easy to automate the badge reward system upon closing an assignment. For instance, an instructor may decide to reward badges to the top 3 scores on an assignment so once the assignment closes those students will automatically be given those badges. &lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must turn on badging for their assignment upon creating or editing an assignment. When turning on the badging system the instructor may specify how many badges will be distributed, or choose to distribute them based off of a scoring threshold that students must achieve. &lt;br /&gt;
&lt;br /&gt;
Following the completion of an assignment an instructor may view the awarded badges on the assignment page. A student will be able to view their earned badges on their homepage categorized by course and assignment. &lt;br /&gt;
. &lt;br /&gt;
The layout of each page will match with the currently existing design standards in Expertiza we will continue to use the header and will use headings and links much like other pages. Figure 1 below shows what the leaderboard may look like from a student perspective. Each course the student has participated in will be displayed on the page and by clicking the “Show Badges” the page will generate a list of each of the participants sorted by the number of badges they have earned. In order to display the badges the application will make a call to Credly to query about student badges.&lt;br /&gt;
&lt;br /&gt;
[[File: StudentLeaderboard.png]]&lt;br /&gt;
Figure 1: Student Leaderboard&lt;br /&gt;
&lt;br /&gt;
The next figures are all from the perspective of an inspector or admin. In Figure 3 below an instructor may view the badges earned for a given assignment or course in which they own. They will get to his page by clicking a badges button from either the assignments or courses page. The title of the page will be the name of either the course of assignment. Like the previous figure, by clicking show badges the list of course participants will appear sorted by the number of badges they have earned. Another link, “Award Badges” will be used to manually grant a badge. When an instructor or admin clicks on the link, they will be directed to the credly page in order to grant the badge to the student.  &lt;br /&gt;
&lt;br /&gt;
[[File: InstructorAssignment.png]]&lt;br /&gt;
Figure 2: Instructor assignment / course badge view&lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must first enable them for the assignment. The badges will be enabled by default. The figure below shows some of the settings associated with the badges system. Instructors may choose to automatically grant badges to students based off of their performance on the assignment. When editing or creating a new assignment they may come to the new badges tab and configure how they want the badges granted. Instructors may choose to grant some number of badges to the top scores of the group defined by the number the input, or they may decide to grant badges to anyone who may achieve a score past the provided scoring threshold. &lt;br /&gt;
&lt;br /&gt;
[[File: EditAssignmentBadges.png]]&lt;br /&gt;
Figure 3: Assignment Badge Settings&lt;br /&gt;
&lt;br /&gt;
Like assignments, courses also need to have some settings to configure badges. In Figure 4, instructors may automatically grant badges for students based on mean scores of multiple assignments throughout the course. First the instructor must check all of the assignments they would like to include in the mean then they must select a scoring strategy. Like the previous figure, they may choose between granting a badge to the top number of participants based on instructor input, or they may set a threshold on a mean score and any student who has achieved a score past the mean will be granted a badge. &lt;br /&gt;
&lt;br /&gt;
[[File: BadgeCourseOptions.png]]&lt;br /&gt;
Figure 4: Edit Course&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102141</id>
		<title>CSC/ECE 517 Spring 2016/Badging System</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102141"/>
		<updated>2016-04-11T21:57:54Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Added some use cases&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
===Background===&lt;br /&gt;
Much like physical badges in the army and youth scout troops, digital badges are an assessment and credentialing mechanism that is housed and managed online. Badges are designed to make visible and validate learning in both formal and informal settings, and hold the potential to help transform where and how learning is valued. In other words, badges may be used in order to set goals and motivations for students and reward and may help to improve their academic scores. Badges can also be considered as a way to reward student’s success. Moreover, badges can be used by teachers for alternative assessment techniques.&lt;br /&gt;
&lt;br /&gt;
===Purpose===&lt;br /&gt;
One request for the Expertiza system is to add a badging system as a way to measure student performance. Expertiza will take advantage of the motivations created from badges by awarding students with new badges based off providing a variety of factors within the Expertiza system. Some of these badges include: achieving a top percentage of scores in an assignment, achieving a high peer review score, performing well overall in a course and other manual accomplishments deemed necessary by the teaching staff for a course. Instead of implementing the whole badging system, we will call an existing online badging web service, Credly, and integrate it with Expertiza.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
===System Requirements===&lt;br /&gt;
The system requirements focuses on adding a 'badging' functionality in Expertiza. This feature allows instructors to assign badges to students based on their performance and accomplishments. Badges are of types - course-level and assignment-level. Badges can be pre-selected while creating an assignment and automatically triggered when student finished the assignment or assignment is closed. Badges can also be awarded manually by instructor to an individual or a team. A leaderboard gives an account of standing of students in terms of badges earned. In order to implement a badging system, a third party badge manager will be utilized called Credly. Credly provides a way for users to accumulate and display badges they earn in a centralized way. By utilizing Credly, the development of the actual badges and badge management can be abstracted away from the project.&lt;br /&gt;
&lt;br /&gt;
The testing of these requirements will use Rspec testing framework for all non-user interface related modifications. All user-interface modifications resulting from the user requirements will be tested manually.&lt;br /&gt;
===Use Case===&lt;br /&gt;
The following simple illustration shows the use cases of the system.&lt;br /&gt;
&lt;br /&gt;
[[File:Use_case.PNG]]&lt;br /&gt;
&lt;br /&gt;
====Use Cases====&lt;br /&gt;
* Student Views Leaderboard&lt;br /&gt;
** Actor: Student&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Mouse over Home&lt;br /&gt;
**# Select Leaderboard &lt;br /&gt;
* Instructor Views Assignment Leaderboard&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select Assignments&lt;br /&gt;
**# Select View Badges on assignment&lt;br /&gt;
* Instructor Edits Assignment Badges&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select Assignments&lt;br /&gt;
**# Select Edit Assignments&lt;br /&gt;
**# Select Badges tab&lt;br /&gt;
**# Check enable badges&lt;br /&gt;
* Instructor Creates Course Badges&lt;br /&gt;
** Actor: Instructor&lt;br /&gt;
** Other Participants: None&lt;br /&gt;
** Primary Sequence:&lt;br /&gt;
**# Log into Expertiza&lt;br /&gt;
**# Select Courses&lt;br /&gt;
**# Select Edit Badges&lt;br /&gt;
**# Check assignments&lt;br /&gt;
**# Check Score Threshold&lt;br /&gt;
**# Enter 95.5 as scoring threshold&lt;br /&gt;
**# Select Submit&lt;br /&gt;
&lt;br /&gt;
===Tasks To Do===&lt;br /&gt;
*Create db table to store the participants with badges.&lt;br /&gt;
*Write code for calling the service and calculating/identifying badges based on the scores of students on all assignments.&lt;br /&gt;
*Add badge specification to course details and assignment details page for the instructor to specify the badges.&lt;br /&gt;
*Create views for both students and instructors. Students should be able to view their badges from different courses and instructors should be able to see the badges awarded/earned for their class.&lt;br /&gt;
*Display a subset of the badge holders on the leaderboard page. Also, student can view badges of other students in the course.&lt;br /&gt;
*Criteria to be followed for awarding badges:&lt;br /&gt;
#Top scores for an assignment. (configured at assignment page)&lt;br /&gt;
#All scores more than a threshold for an assignment. (configured at assignment page)&lt;br /&gt;
#Mean score of selected assignments being greater than threshold. (configured at course page)&lt;br /&gt;
#Top mean score of selected assignments. (configured at course page)&lt;br /&gt;
#Discretionary merit badges for projects that exceed expectations.&lt;br /&gt;
&lt;br /&gt;
===Files Identified===&lt;br /&gt;
Associated files goes here.&lt;br /&gt;
&lt;br /&gt;
===Deciding External Web Service===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Factors !! Open Badges !! Credly !! Bestr&lt;br /&gt;
|-&lt;br /&gt;
| Native User Management || No || Yes. No need to store all records locally. || No&lt;br /&gt;
|-&lt;br /&gt;
| Extensive API Support || Yes. But many still in beta phase. || Yes. (Primary reason for choosing Credly) || No&lt;br /&gt;
|-&lt;br /&gt;
| Interactive Badge Builder SDK|| Yes. But still in beta phase. || Yes || Yes. But gives few options for cusromization.&lt;br /&gt;
|-&lt;br /&gt;
| Existing Integration with other systems || Few || Many || No&lt;br /&gt;
|-&lt;br /&gt;
| Monetary Costs || Free || Free tier as well as paid plans. || Paid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
From the above rubrics, we decided to use Credly as our web service for badging system.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
The Expertiza badging system will largely be driven by academic achievement from students. By using student’s scores as a way to provide badges it will be easy to automate the badge reward system upon closing an assignment. For instance, an instructor may decide to reward badges to the top 3 scores on an assignment so once the assignment closes those students will automatically be given those badges. &lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must turn on badging for their assignment upon creating or editing an assignment. When turning on the badging system the instructor may specify how many badges will be distributed, or choose to distribute them based off of a scoring threshold that students must achieve. &lt;br /&gt;
&lt;br /&gt;
Following the completion of an assignment an instructor may view the awarded badges on the assignment page. A student will be able to view their earned badges on their homepage categorized by course and assignment. &lt;br /&gt;
. &lt;br /&gt;
The layout of each page will match with the currently existing design standards in Expertiza we will continue to use the header and will use headings and links much like other pages. Figure 1 below shows what the leaderboard may look like from a student perspective. Each course the student has participated in will be displayed on the page and by clicking the “Show Badges” the page will generate a list of each of the participants sorted by the number of badges they have earned. In order to display the badges the application will make a call to Credly to query about student badges.&lt;br /&gt;
&lt;br /&gt;
[[File: StudentLeaderboard.png]]&lt;br /&gt;
Figure 1: Student Leaderboard&lt;br /&gt;
&lt;br /&gt;
The next figures are all from the perspective of an inspector or admin. In Figure 3 below an instructor may view the badges earned for a given assignment or course in which they own. They will get to his page by clicking a badges button from either the assignments or courses page. The title of the page will be the name of either the course of assignment. Like the previous figure, by clicking show badges the list of course participants will appear sorted by the number of badges they have earned. Another link, “Award Badges” will be used to manually grant a badge. When an instructor or admin clicks on the link, they will be directed to the credly page in order to grant the badge to the student.  &lt;br /&gt;
&lt;br /&gt;
[[File: InstructorAssignment.png]]&lt;br /&gt;
Figure 2: Instructor assignment / course badge view&lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must first enable them for the assignment. The badges will be enabled by default. The figure below shows some of the settings associated with the badges system. Instructors may choose to automatically grant badges to students based off of their performance on the assignment. When editing or creating a new assignment they may come to the new badges tab and configure how they want the badges granted. Instructors may choose to grant some number of badges to the top scores of the group defined by the number the input, or they may decide to grant badges to anyone who may achieve a score past the provided scoring threshold. &lt;br /&gt;
&lt;br /&gt;
[[File: EditAssignmentBadges.png]]&lt;br /&gt;
Figure 3: Assignment Badge Settings&lt;br /&gt;
&lt;br /&gt;
Like assignments, courses also need to have some settings to configure badges. In Figure 4, instructors may automatically grant badges for students based on mean scores of multiple assignments throughout the course. First the instructor must check all of the assignments they would like to include in the mean then they must select a scoring strategy. Like the previous figure, they may choose between granting a badge to the top number of participants based on instructor input, or they may set a threshold on a mean score and any student who has achieved a score past the mean will be granted a badge. &lt;br /&gt;
&lt;br /&gt;
[[File: BadgeCourseOptions.png]]&lt;br /&gt;
Figure 4: Edit Course&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
The following tables will be created to implement a solution for this project.&lt;br /&gt;
&lt;br /&gt;
1. badges table - which stores badge_id and their descriptions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Description of the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. badge_users table - which stores details about what badges are assignment to a user and related details.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_user_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Referenced from badges table&lt;br /&gt;
|-&lt;br /&gt;
| user_id || int || Referenced from users table&lt;br /&gt;
|-&lt;br /&gt;
| course_id || int || Referenced from courses table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|-&lt;br /&gt;
| is_course_badge || boolean || Whether badge is a course-badge or individual-badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
3. badge_groups - which stores information about which badges should be assigned depending on the threshold score.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| strategy || string || Describes the strategy of awarding&lt;br /&gt;
|-&lt;br /&gt;
| threshold || int || Score required to award the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
4. assignment_groups - which stores details about the team badges.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| assignment_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Referenced from badge_groups table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
# MVC – The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
# DRY Principle – We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design==&lt;br /&gt;
As with most Ruby on Rails applications, this solution uses the Model-View-Controller&lt;br /&gt;
design pattern. The following diagram shows a workflow of the planned design along with the attributes and operations that are&lt;br /&gt;
relevant to the implementation of this solution.&lt;br /&gt;
&lt;br /&gt;
[[File:Cap1.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Mockups==&lt;br /&gt;
&lt;br /&gt;
Mockup goes here&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102138</id>
		<title>CSC/ECE 517 Spring 2016/Badging System</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102138"/>
		<updated>2016-04-11T21:48:22Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Added images&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
===Background===&lt;br /&gt;
Much like physical badges in the army and youth scout troops, digital badges are an assessment and credentialing mechanism that is housed and managed online. Badges are designed to make visible and validate learning in both formal and informal settings, and hold the potential to help transform where and how learning is valued. In other words, badges may be used in order to set goals and motivations for students and reward and may help to improve their academic scores. Badges can also be considered as a way to reward student’s success. Moreover, badges can be used by teachers for alternative assessment techniques.&lt;br /&gt;
&lt;br /&gt;
===Purpose===&lt;br /&gt;
One request for the Expertiza system is to add a badging system as a way to measure student performance. Expertiza will take advantage of the motivations created from badges by awarding students with new badges based off providing a variety of factors within the Expertiza system. Some of these badges include: achieving a top percentage of scores in an assignment, achieving a high peer review score, performing well overall in a course and other manual accomplishments deemed necessary by the teaching staff for a course. Instead of implementing the whole badging system, we will call an existing online badging web service, Credly, and integrate it with Expertiza.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
===System Requirements===&lt;br /&gt;
The system requirements focuses on adding a 'badging' functionality in Expertiza. This feature allows instructors to assign badges to students based on their performance and accomplishments. Badges are of types - course-level and assignment-level. Badges can be pre-selected while creating an assignment and automatically triggered when student finished the assignment or assignment is closed. Badges can also be awarded manually by instructor to an individual or a team. A leaderboard gives an account of standing of students in terms of badges earned. In order to implement a badging system, a third party badge manager will be utilized called Credly. Credly provides a way for users to accumulate and display badges they earn in a centralized way. By utilizing Credly, the development of the actual badges and badge management can be abstracted away from the project.&lt;br /&gt;
&lt;br /&gt;
The testing of these requirements will use Rspec testing framework for all non-user interface related modifications. All user-interface modifications resulting from the user requirements will be tested manually.&lt;br /&gt;
===Use Case===&lt;br /&gt;
The following simple illustration shows the use cases of the system.&lt;br /&gt;
&lt;br /&gt;
[[File:Use_case.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Tasks To Do===&lt;br /&gt;
*Create db table to store the participants with badges.&lt;br /&gt;
*Write code for calling the service and calculating/identifying badges based on the scores of students on all assignments.&lt;br /&gt;
*Add badge specification to course details and assignment details page for the instructor to specify the badges.&lt;br /&gt;
*Create views for both students and instructors. Students should be able to view their badges from different courses and instructors should be able to see the badges awarded/earned for their class.&lt;br /&gt;
*Display a subset of the badge holders on the leaderboard page. Also, student can view badges of other students in the course.&lt;br /&gt;
*Criteria to be followed for awarding badges:&lt;br /&gt;
#Top scores for an assignment. (configured at assignment page)&lt;br /&gt;
#All scores more than a threshold for an assignment. (configured at assignment page)&lt;br /&gt;
#Mean score of selected assignments being greater than threshold. (configured at course page)&lt;br /&gt;
#Top mean score of selected assignments. (configured at course page)&lt;br /&gt;
#Discretionary merit badges for projects that exceed expectations.&lt;br /&gt;
&lt;br /&gt;
===Files Identified===&lt;br /&gt;
Associated files goes here.&lt;br /&gt;
&lt;br /&gt;
===Deciding External Web Service===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Factors !! Open Badges !! Credly !! Bestr&lt;br /&gt;
|-&lt;br /&gt;
| Native User Management || No || Yes. No need to store all records locally. || No&lt;br /&gt;
|-&lt;br /&gt;
| Extensive API Support || Yes. But many still in beta phase. || Yes. (Primary reason for choosing Credly) || No&lt;br /&gt;
|-&lt;br /&gt;
| Interactive Badge Builder SDK|| Yes. But still in beta phase. || Yes || Yes. But gives few options for cusromization.&lt;br /&gt;
|-&lt;br /&gt;
| Existing Integration with other systems || Few || Many || No&lt;br /&gt;
|-&lt;br /&gt;
| Monetary Costs || Free || Free tier as well as paid plans. || Paid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
From the above rubrics, we decided to use Credly as our web service for badging system.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
The Expertiza badging system will largely be driven by academic achievement from students. By using student’s scores as a way to provide badges it will be easy to automate the badge reward system upon closing an assignment. For instance, an instructor may decide to reward badges to the top 3 scores on an assignment so once the assignment closes those students will automatically be given those badges. &lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must turn on badging for their assignment upon creating or editing an assignment. When turning on the badging system the instructor may specify how many badges will be distributed, or choose to distribute them based off of a scoring threshold that students must achieve. &lt;br /&gt;
&lt;br /&gt;
Following the completion of an assignment an instructor may view the awarded badges on the assignment page. A student will be able to view their earned badges on their homepage categorized by course and assignment. &lt;br /&gt;
. &lt;br /&gt;
The layout of each page will match with the currently existing design standards in Expertiza we will continue to use the header and will use headings and links much like other pages. Figure 1 below shows what the leaderboard may look like from a student perspective. Each course the student has participated in will be displayed on the page and by clicking the “Show Badges” the page will generate a list of each of the participants sorted by the number of badges they have earned. In order to display the badges the application will make a call to Credly to query about student badges.&lt;br /&gt;
&lt;br /&gt;
[[File: StudentLeaderboard.png]]&lt;br /&gt;
Figure 1: Student Leaderboard&lt;br /&gt;
&lt;br /&gt;
The next figures are all from the perspective of an inspector or admin. In Figure 3 below an instructor may view the badges earned for a given assignment or course in which they own. They will get to his page by clicking a badges button from either the assignments or courses page. The title of the page will be the name of either the course of assignment. Like the previous figure, by clicking show badges the list of course participants will appear sorted by the number of badges they have earned. Another link, “Award Badges” will be used to manually grant a badge. When an instructor or admin clicks on the link, they will be directed to the credly page in order to grant the badge to the student.  &lt;br /&gt;
&lt;br /&gt;
[[File: InstructorAssignment.png]]&lt;br /&gt;
Figure 2: Instructor assignment / course badge view&lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must first enable them for the assignment. The badges will be enabled by default. The figure below shows some of the settings associated with the badges system. Instructors may choose to automatically grant badges to students based off of their performance on the assignment. When editing or creating a new assignment they may come to the new badges tab and configure how they want the badges granted. Instructors may choose to grant some number of badges to the top scores of the group defined by the number the input, or they may decide to grant badges to anyone who may achieve a score past the provided scoring threshold. &lt;br /&gt;
&lt;br /&gt;
[[File: EditAssignmentBadges.png]]&lt;br /&gt;
Figure 3: Assignment Badge Settings&lt;br /&gt;
&lt;br /&gt;
Like assignments, courses also need to have some settings to configure badges. In Figure 4, instructors may automatically grant badges for students based on mean scores of multiple assignments throughout the course. First the instructor must check all of the assignments they would like to include in the mean then they must select a scoring strategy. Like the previous figure, they may choose between granting a badge to the top number of participants based on instructor input, or they may set a threshold on a mean score and any student who has achieved a score past the mean will be granted a badge. &lt;br /&gt;
&lt;br /&gt;
[[File: BadgeCourseOptions.png]]&lt;br /&gt;
Figure 4: Edit Course&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
The following tables will be created to implement a solution for this project.&lt;br /&gt;
&lt;br /&gt;
1. badges table - which stores badge_id and their descriptions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Description of the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. badge_users table - which stores details about what badges are assignment to a user and related details.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_user_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Referenced from badges table&lt;br /&gt;
|-&lt;br /&gt;
| user_id || int || Referenced from users table&lt;br /&gt;
|-&lt;br /&gt;
| course_id || int || Referenced from courses table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|-&lt;br /&gt;
| is_course_badge || boolean || Whether badge is a course-badge or individual-badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
3. badge_groups - which stores information about which badges should be assigned depending on the threshold score.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| strategy || string || Describes the strategy of awarding&lt;br /&gt;
|-&lt;br /&gt;
| threshold || int || Score required to award the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
4. assignment_groups - which stores details about the team badges.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| assignment_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Referenced from badge_groups table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
# MVC – The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
# DRY Principle – We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design==&lt;br /&gt;
As with most Ruby on Rails applications, this solution uses the Model-View-Controller&lt;br /&gt;
design pattern. The following diagram shows a workflow of the planned design along with the attributes and operations that are&lt;br /&gt;
relevant to the implementation of this solution.&lt;br /&gt;
&lt;br /&gt;
[[File:Cap1.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Mockups==&lt;br /&gt;
&lt;br /&gt;
Mockup goes here&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:BadgeCourseOptions.png&amp;diff=102136</id>
		<title>File:BadgeCourseOptions.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:BadgeCourseOptions.png&amp;diff=102136"/>
		<updated>2016-04-11T21:47:47Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:EditAssignmentBadges.png&amp;diff=102135</id>
		<title>File:EditAssignmentBadges.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:EditAssignmentBadges.png&amp;diff=102135"/>
		<updated>2016-04-11T21:46:44Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: uploaded a new version of &amp;amp;quot;File:EditAssignmentBadges.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:InstructorAssignment.png&amp;diff=102133</id>
		<title>File:InstructorAssignment.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:InstructorAssignment.png&amp;diff=102133"/>
		<updated>2016-04-11T21:45:43Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: uploaded a new version of &amp;amp;quot;File:InstructorAssignment.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentLeaderboard.png&amp;diff=102132</id>
		<title>File:StudentLeaderboard.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentLeaderboard.png&amp;diff=102132"/>
		<updated>2016-04-11T21:44:00Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: uploaded a new version of &amp;amp;quot;File:StudentLeaderboard.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First one broke trying again&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:EditAssignmentBadges.png&amp;diff=102131</id>
		<title>File:EditAssignmentBadges.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:EditAssignmentBadges.png&amp;diff=102131"/>
		<updated>2016-04-11T21:40:03Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:InstructorAssignment.png&amp;diff=102130</id>
		<title>File:InstructorAssignment.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:InstructorAssignment.png&amp;diff=102130"/>
		<updated>2016-04-11T21:37:55Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentLeaderboard.png&amp;diff=102129</id>
		<title>File:StudentLeaderboard.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentLeaderboard.png&amp;diff=102129"/>
		<updated>2016-04-11T21:36:00Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: First one broke trying again&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First one broke trying again&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102127</id>
		<title>CSC/ECE 517 Spring 2016/Badging System</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102127"/>
		<updated>2016-04-11T21:33:43Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
===Background===&lt;br /&gt;
Much like physical badges in the army and youth scout troops, digital badges are an assessment and credentialing mechanism that is housed and managed online. Badges are designed to make visible and validate learning in both formal and informal settings, and hold the potential to help transform where and how learning is valued. In other words, badges may be used in order to set goals and motivations for students and reward and may help to improve their academic scores. Badges can also be considered as a way to reward student’s success. Moreover, badges can be used by teachers for alternative assessment techniques.&lt;br /&gt;
&lt;br /&gt;
===Purpose===&lt;br /&gt;
One request for the Expertiza system is to add a badging system as a way to measure student performance. Expertiza will take advantage of the motivations created from badges by awarding students with new badges based off providing a variety of factors within the Expertiza system. Some of these badges include: achieving a top percentage of scores in an assignment, achieving a high peer review score, performing well overall in a course and other manual accomplishments deemed necessary by the teaching staff for a course. Instead of implementing the whole badging system, we will call an existing online badging web service, Credly, and integrate it with Expertiza.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
===System Requirements===&lt;br /&gt;
The system requirements focuses on adding a 'badging' functionality in Expertiza. This feature allows instructors to assign badges to students based on their performance and accomplishments. Badges are of types - course-level and assignment-level. Badges can be pre-selected while creating an assignment and automatically triggered when student finished the assignment or assignment is closed. Badges can also be awarded manually by instructor to an individual or a team. A leaderboard gives an account of standing of students in terms of badges earned. In order to implement a badging system, a third party badge manager will be utilized called Credly. Credly provides a way for users to accumulate and display badges they earn in a centralized way. By utilizing Credly, the development of the actual badges and badge management can be abstracted away from the project.&lt;br /&gt;
&lt;br /&gt;
The testing of these requirements will use Rspec testing framework for all non-user interface related modifications. All user-interface modifications resulting from the user requirements will be tested manually.&lt;br /&gt;
===Use Case===&lt;br /&gt;
The following simple illustration shows the use cases of the system.&lt;br /&gt;
&lt;br /&gt;
[[File:Use_case.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Tasks To Do===&lt;br /&gt;
*Create db table to store the participants with badges.&lt;br /&gt;
*Write code for calling the service and calculating/identifying badges based on the scores of students on all assignments.&lt;br /&gt;
*Add badge specification to course details and assignment details page for the instructor to specify the badges.&lt;br /&gt;
*Create views for both students and instructors. Students should be able to view their badges from different courses and instructors should be able to see the badges awarded/earned for their class.&lt;br /&gt;
*Display a subset of the badge holders on the leaderboard page. Also, student can view badges of other students in the course.&lt;br /&gt;
*Criteria to be followed for awarding badges:&lt;br /&gt;
#Top scores for an assignment. (configured at assignment page)&lt;br /&gt;
#All scores more than a threshold for an assignment. (configured at assignment page)&lt;br /&gt;
#Mean score of selected assignments being greater than threshold. (configured at course page)&lt;br /&gt;
#Top mean score of selected assignments. (configured at course page)&lt;br /&gt;
#Discretionary merit badges for projects that exceed expectations.&lt;br /&gt;
&lt;br /&gt;
===Files Identified===&lt;br /&gt;
Associated files goes here.&lt;br /&gt;
&lt;br /&gt;
===Deciding External Web Service===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Factors !! Open Badges !! Credly !! Bestr&lt;br /&gt;
|-&lt;br /&gt;
| Native User Management || No || Yes. No need to store all records locally. || No&lt;br /&gt;
|-&lt;br /&gt;
| Extensive API Support || Yes. But many still in beta phase. || Yes. (Primary reason for choosing Credly) || No&lt;br /&gt;
|-&lt;br /&gt;
| Interactive Badge Builder SDK|| Yes. But still in beta phase. || Yes || Yes. But gives few options for cusromization.&lt;br /&gt;
|-&lt;br /&gt;
| Existing Integration with other systems || Few || Many || No&lt;br /&gt;
|-&lt;br /&gt;
| Monetary Costs || Free || Free tier as well as paid plans. || Paid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
From the above rubrics, we decided to use Credly as our web service for badging system.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
The Expertiza badging system will largely be driven by academic achievement from students. By using student’s scores as a way to provide badges it will be easy to automate the badge reward system upon closing an assignment. For instance, an instructor may decide to reward badges to the top 3 scores on an assignment so once the assignment closes those students will automatically be given those badges. &lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must turn on badging for their assignment upon creating or editing an assignment. When turning on the badging system the instructor may specify how many badges will be distributed, or choose to distribute them based off of a scoring threshold that students must achieve. &lt;br /&gt;
&lt;br /&gt;
Following the completion of an assignment an instructor may view the awarded badges on the assignment page. A student will be able to view their earned badges on their homepage categorized by course and assignment. &lt;br /&gt;
&lt;br /&gt;
In order to implement a badging system, a third party badge manager will be utilized called Credly. Credly provides a way for users to accumulate and display badges they earn in a centralized way. By utilizing Credly, the development of the actual badges and badge management can be abstracted away from the project. &lt;br /&gt;
&lt;br /&gt;
The layout of each page will match with the currently existing design standards in Expertiza we will continue to use the header and will use headings and links much like other pages. Figure 1 below shows what the leaderboard may look like from a student perspective. Each course the student has participated in will be displayed on the page and by clicking the “Show Badges” the page will generate a list of each of the participants sorted by the number of badges they have earned. In order to display the badges the application will make a call to Credly to query about student badges.&lt;br /&gt;
&lt;br /&gt;
[[File: Badge_student_leaderboard.png |600x454px]]&lt;br /&gt;
Figure 1: Student Leaderboard&lt;br /&gt;
&lt;br /&gt;
The next figures are all from the perspective of an inspector or admin. In Figure 3 below an instructor may view the badges earned for a given assignment or course in which they own. They will get to his page by clicking a badges button from either the assignments or courses page. The title of the page will be the name of either the course of assignment. Like the previous figure, by clicking show badges the list of course participants will appear sorted by the number of badges they have earned. Another link, “Award Badges” will be used to manually grant a badge. When an instructor or admin clicks on the link, they will be directed to the credly page in order to grant the badge to the student.  &lt;br /&gt;
&lt;br /&gt;
[[File: example.jpg]]&lt;br /&gt;
Figure 2: Instructor assignment / course badge view&lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must first enable them for the assignment. The badges will be enabled by default. The figure below shows some of the settings associated with the badges system. Instructors may choose to automatically grant badges to students based off of their performance on the assignment. When editing or creating a new assignment they may come to the new badges tab and configure how they want the badges granted. Instructors may choose to grant some number of badges to the top scores of the group defined by the number the input, or they may decide to grant badges to anyone who may achieve a score past the provided scoring threshold. &lt;br /&gt;
&lt;br /&gt;
[[File: example.jpg]]&lt;br /&gt;
Figure 3: Assignment Badge Settings&lt;br /&gt;
&lt;br /&gt;
Like assignments, courses also need to have some settings to configure badges. In Figure 4, instructors may automatically grant badges for students based on mean scores of multiple assignments throughout the course. First the instructor must check all of the assignments they would like to include in the mean then they must select a scoring strategy. Like the previous figure, they may choose between granting a badge to the top number of participants based on instructor input, or they may set a threshold on a mean score and any student who has achieved a score past the mean will be granted a badge. &lt;br /&gt;
&lt;br /&gt;
[[File: example.jpg]]&lt;br /&gt;
Figure 4: Edit Course&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
The following tables will be created to implement a solution for this project.&lt;br /&gt;
&lt;br /&gt;
1. badges table - which stores badge_id and their descriptions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Description of the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. badge_users table - which stores details about what badges are assignment to a user and related details.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_user_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Referenced from badges table&lt;br /&gt;
|-&lt;br /&gt;
| user_id || int || Referenced from users table&lt;br /&gt;
|-&lt;br /&gt;
| course_id || int || Referenced from courses table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|-&lt;br /&gt;
| is_course_badge || boolean || Whether badge is a course-badge or individual-badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
3. badge_groups - which stores information about which badges should be assigned depending on the threshold score.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| strategy || string || Describes the strategy of awarding&lt;br /&gt;
|-&lt;br /&gt;
| threshold || int || Score required to award the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
4. assignment_groups - which stores details about the team badges.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| assignment_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Referenced from badge_groups table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
# MVC – The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
# DRY Principle – We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design==&lt;br /&gt;
As with most Ruby on Rails applications, this solution uses the Model-View-Controller&lt;br /&gt;
design pattern. The following diagram shows a workflow of the planned design along with the attributes and operations that are&lt;br /&gt;
relevant to the implementation of this solution.&lt;br /&gt;
&lt;br /&gt;
[[File:Cap1.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Mockups==&lt;br /&gt;
&lt;br /&gt;
Mockup goes here&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102122</id>
		<title>CSC/ECE 517 Spring 2016/Badging System</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102122"/>
		<updated>2016-04-11T21:29:24Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
===Background===&lt;br /&gt;
Much like physical badges in the army and youth scout troops, digital badges are an assessment and credentialing mechanism that is housed and managed online. Badges are designed to make visible and validate learning in both formal and informal settings, and hold the potential to help transform where and how learning is valued. In other words, badges may be used in order to set goals and motivations for students and reward and may help to improve their academic scores. Badges can also be considered as a way to reward student’s success. Moreover, badges can be used by teachers for alternative assessment techniques.&lt;br /&gt;
&lt;br /&gt;
===Purpose===&lt;br /&gt;
One request for the Expertiza system is to add a badging system as a way to measure student performance. Expertiza will take advantage of the motivations created from badges by awarding students with new badges based off providing a variety of factors within the Expertiza system. Some of these badges include: achieving a top percentage of scores in an assignment, achieving a high peer review score, performing well overall in a course and other manual accomplishments deemed necessary by the teaching staff for a course. Instead of implementing the whole badging system, we will call an existing online badging web service, Credly, and integrate it with Expertiza.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
===System Requirements===&lt;br /&gt;
The system requirements focuses on adding a 'badging' functionality in Expertiza. This feature allows instructors to assign badges to students based on their performance and accomplishments. Badges are of types - course-level and assignment-level. Badges can be pre-selected while creating an assignment and automatically triggered when student finished the assignment or assignment is closed. Badges can also be awarded manually by instructor to an individual or a team. A leaderboard gives an account of standing of students in terms of badges earned. In order to implement a badging system, a third party badge manager will be utilized called Credly. Credly provides a way for users to accumulate and display badges they earn in a centralized way. By utilizing Credly, the development of the actual badges and badge management can be abstracted away from the project.&lt;br /&gt;
&lt;br /&gt;
The testing of these requirements will use Rspec testing framework for all non-user interface related modifications. All user-interface modifications resulting from the user requirements will be tested manually.&lt;br /&gt;
===Use Case===&lt;br /&gt;
The following simple illustration shows the use cases of the system.&lt;br /&gt;
&lt;br /&gt;
[[File:Use_case.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Tasks To Do===&lt;br /&gt;
*Create db table to store the participants with badges.&lt;br /&gt;
*Write code for calling the service and calculating/identifying badges based on the scores of students on all assignments.&lt;br /&gt;
*Add badge specification to course details and assignment details page for the instructor to specify the badges.&lt;br /&gt;
*Create views for both students and instructors. Students should be able to view their badges from different courses and instructors should be able to see the badges awarded/earned for their class.&lt;br /&gt;
*Display a subset of the badge holders on the leaderboard page. Also, student can view badges of other students in the course.&lt;br /&gt;
*Criteria to be followed for awarding badges:&lt;br /&gt;
#Top scores for an assignment. (configured at assignment page)&lt;br /&gt;
#All scores more than a threshold for an assignment. (configured at assignment page)&lt;br /&gt;
#Mean score of selected assignments being greater than threshold. (configured at course page)&lt;br /&gt;
#Top mean score of selected assignments. (configured at course page)&lt;br /&gt;
#Discretionary merit badges for projects that exceed expectations.&lt;br /&gt;
&lt;br /&gt;
===Deciding External Web Service===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Factors !! Open Badges !! Credly !! Bestr&lt;br /&gt;
|-&lt;br /&gt;
| Native User Management || No || Yes. No need to store all records locally. || No&lt;br /&gt;
|-&lt;br /&gt;
| Extensive API Support || Yes. But many still in beta phase. || Yes. (Primary reason for choosing Credly) || No&lt;br /&gt;
|-&lt;br /&gt;
| Interactive Badge Builder SDK|| Yes. But still in beta phase. || Yes || Yes. But gives few options for cusromization.&lt;br /&gt;
|-&lt;br /&gt;
| Existing Integration with other systems || Few || Many || No&lt;br /&gt;
|-&lt;br /&gt;
| Monetary Costs || Free || Free tier as well as paid plans. || Paid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
From the above rubrics, we decided to use Credly as our web service for badging system.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
The Expertiza badging system will largely be driven by academic achievement from students. By using student’s scores as a way to provide badges it will be easy to automate the badge reward system upon closing an assignment. For instance, an instructor may decide to reward badges to the top 3 scores on an assignment so once the assignment closes those students will automatically be given those badges. &lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must turn on badging for their assignment upon creating or editing an assignment. When turning on the badging system the instructor may specify how many badges will be distributed, or choose to distribute them based off of a scoring threshold that students must achieve. &lt;br /&gt;
&lt;br /&gt;
Following the completion of an assignment an instructor may view the awarded badges on the assignment page. A student will be able to view their earned badges on their homepage categorized by course and assignment. &lt;br /&gt;
&lt;br /&gt;
In order to implement a badging system, a third party badge manager will be utilized called Credly. Credly provides a way for users to accumulate and display badges they earn in a centralized way. By utilizing Credly, the development of the actual badges and badge management can be abstracted away from the project. &lt;br /&gt;
&lt;br /&gt;
The layout of each page will match with the currently existing design standards in Expertiza we will continue to use the header and will use headings and links much like other pages. Figure 1 below shows what the leaderboard may look like from a student perspective. Each course the student has participated in will be displayed on the page and by clicking the “Show Badges” the page will generate a list of each of the participants sorted by the number of badges they have earned. In order to display the badges the application will make a call to Credly to query about student badges.&lt;br /&gt;
&lt;br /&gt;
[[File: Badge_student_leaderboard.png]]&lt;br /&gt;
Figure 1: Student Leaderboard&lt;br /&gt;
&lt;br /&gt;
The next figures are all from the perspective of an inspector or admin. In Figure 3 below an instructor may view the badges earned for a given assignment or course in which they own. They will get to his page by clicking a badges button from either the assignments or courses page. The title of the page will be the name of either the course of assignment. Like the previous figure, by clicking show badges the list of course participants will appear sorted by the number of badges they have earned. Another link, “Award Badges” will be used to manually grant a badge. When an instructor or admin clicks on the link, they will be directed to the credly page in order to grant the badge to the student.  &lt;br /&gt;
&lt;br /&gt;
[[File: example.jpg]]&lt;br /&gt;
Figure 2: Instructor assignment / course badge view&lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must first enable them for the assignment. The badges will be enabled by default. The figure below shows some of the settings associated with the badges system. Instructors may choose to automatically grant badges to students based off of their performance on the assignment. When editing or creating a new assignment they may come to the new badges tab and configure how they want the badges granted. Instructors may choose to grant some number of badges to the top scores of the group defined by the number the input, or they may decide to grant badges to anyone who may achieve a score past the provided scoring threshold. &lt;br /&gt;
&lt;br /&gt;
[[File: example.jpg]]&lt;br /&gt;
Figure 3: Assignment Badge Settings&lt;br /&gt;
&lt;br /&gt;
Like assignments, courses also need to have some settings to configure badges. In Figure 4, instructors may automatically grant badges for students based on mean scores of multiple assignments throughout the course. First the instructor must check all of the assignments they would like to include in the mean then they must select a scoring strategy. Like the previous figure, they may choose between granting a badge to the top number of participants based on instructor input, or they may set a threshold on a mean score and any student who has achieved a score past the mean will be granted a badge. &lt;br /&gt;
&lt;br /&gt;
[[File: example.jpg]]&lt;br /&gt;
Figure 4: Edit Course&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
The following tables will be created to implement a solution for this project.&lt;br /&gt;
&lt;br /&gt;
1. badges table - which stores badge_id and their descriptions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Description of the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. badge_users table - which stores details about what badges are assignment to a user and related details.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_user_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Referenced from badges table&lt;br /&gt;
|-&lt;br /&gt;
| user_id || int || Referenced from users table&lt;br /&gt;
|-&lt;br /&gt;
| course_id || int || Referenced from courses table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|-&lt;br /&gt;
| is_course_badge || boolean || Whether badge is a course-badge or individual-badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
3. badge_groups - which stores information about which badges should be assigned depending on the threshold score.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| strategy || string || Describes the strategy of awarding&lt;br /&gt;
|-&lt;br /&gt;
| threshold || int || Score required to award the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
4. assignment_groups - which stores details about the team badges.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| assignment_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Referenced from badge_groups table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
# MVC – The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
# DRY Principle – We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design==&lt;br /&gt;
As with most Ruby on Rails applications, this solution uses the Model-View-Controller&lt;br /&gt;
design pattern. The following diagram shows a workflow of the planned design along with the attributes and operations that are&lt;br /&gt;
relevant to the implementation of this solution.&lt;br /&gt;
&lt;br /&gt;
[[File:Cap1.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Mockups==&lt;br /&gt;
&lt;br /&gt;
Mockup goes here&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Badge_student_leaderboard.png&amp;diff=102121</id>
		<title>File:Badge student leaderboard.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Badge_student_leaderboard.png&amp;diff=102121"/>
		<updated>2016-04-11T21:28:30Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: uploaded a new version of &amp;amp;quot;File:Badge student leaderboard.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Badge_student_leaderboard.png&amp;diff=102119</id>
		<title>File:Badge student leaderboard.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Badge_student_leaderboard.png&amp;diff=102119"/>
		<updated>2016-04-11T21:28:06Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102118</id>
		<title>CSC/ECE 517 Spring 2016/Badging System</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/Badging_System&amp;diff=102118"/>
		<updated>2016-04-11T21:27:07Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Added design section need to figure out how to add images&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
===Background===&lt;br /&gt;
Much like physical badges in the army and youth scout troops, digital badges are an assessment and credentialing mechanism that is housed and managed online. Badges are designed to make visible and validate learning in both formal and informal settings, and hold the potential to help transform where and how learning is valued. In other words, badges may be used in order to set goals and motivations for students and reward and may help to improve their academic scores. Badges can also be considered as a way to reward student’s success. Moreover, badges can be used by teachers for alternative assessment techniques.&lt;br /&gt;
&lt;br /&gt;
===Purpose===&lt;br /&gt;
One request for the Expertiza system is to add a badging system as a way to measure student performance. Expertiza will take advantage of the motivations created from badges by awarding students with new badges based off providing a variety of factors within the Expertiza system. Some of these badges include: achieving a top percentage of scores in an assignment, achieving a high peer review score, performing well overall in a course and other manual accomplishments deemed necessary by the teaching staff for a course. Instead of implementing the whole badging system, we will call an existing online badging web service, Credly, and integrate it with Expertiza.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
===Use Case===&lt;br /&gt;
The following simple illustration shows the use cases of the system.&lt;br /&gt;
&lt;br /&gt;
[[File:Use_case.PNG]]&lt;br /&gt;
&lt;br /&gt;
===Tasks To Do===&lt;br /&gt;
*Create db table to store the participants with badges.&lt;br /&gt;
*Write code for calling the service and calculating/identifying badges based on the scores of students on all assignments.&lt;br /&gt;
*Add badge specification to course details and assignment details page for the instructor to specify the badges.&lt;br /&gt;
*Create views for both students and instructors. Students should be able to view their badges from different courses and instructors should be able to see the badges awarded/earned for their class.&lt;br /&gt;
*Display a subset of the badge holders on the leaderboard page. Also, student can view badges of other students in the course.&lt;br /&gt;
*Criteria to be followed for awarding badges:&lt;br /&gt;
#Top scores for an assignment. (configured at assignment page)&lt;br /&gt;
#All scores more than a threshold for an assignment. (configured at assignment page)&lt;br /&gt;
#Mean score of selected assignments being greater than threshold. (configured at course page)&lt;br /&gt;
#Top mean score of selected assignments. (configured at course page)&lt;br /&gt;
#Discretionary merit badges for projects that exceed expectations.&lt;br /&gt;
&lt;br /&gt;
===Deciding External Web Service===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Factors !! Open Badges !! Credly !! Bestr&lt;br /&gt;
|-&lt;br /&gt;
| Native User Management || No || Yes. No need to store all records locally. || No&lt;br /&gt;
|-&lt;br /&gt;
| Extensive API Support || Yes. But many still in beta phase. || Yes. (Primary reason for choosing Credly) || No&lt;br /&gt;
|-&lt;br /&gt;
| Interactive Badge Builder SDK|| Yes. But still in beta phase. || Yes || Yes. But gives few options for cusromization.&lt;br /&gt;
|-&lt;br /&gt;
| Existing Integration with other systems || Few || Many || No&lt;br /&gt;
|-&lt;br /&gt;
| Monetary Costs || Free || Free tier as well as paid plans. || Paid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
From the above rubrics, we decided to use Credly as our web service for badging system.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
The Expertiza badging system will largely be driven by academic achievement from students. By using student’s scores as a way to provide badges it will be easy to automate the badge reward system upon closing an assignment. For instance, an instructor may decide to reward badges to the top 3 scores on an assignment so once the assignment closes those students will automatically be given those badges. &lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must turn on badging for their assignment upon creating or editing an assignment. When turning on the badging system the instructor may specify how many badges will be distributed, or choose to distribute them based off of a scoring threshold that students must achieve. &lt;br /&gt;
&lt;br /&gt;
Following the completion of an assignment an instructor may view the awarded badges on the assignment page. A student will be able to view their earned badges on their homepage categorized by course and assignment. &lt;br /&gt;
&lt;br /&gt;
In order to implement a badging system, a third party badge manager will be utilized called Credly. Credly provides a way for users to accumulate and display badges they earn in a centralized way. By utilizing Credly, the development of the actual badges and badge management can be abstracted away from the project. &lt;br /&gt;
&lt;br /&gt;
The layout of each page will match with the currently existing design standards in Expertiza we will continue to use the header and will use headings and links much like other pages. Figure 1 below shows what the leaderboard may look like from a student perspective. Each course the student has participated in will be displayed on the page and by clicking the “Show Badges” the page will generate a list of each of the participants sorted by the number of badges they have earned. In order to display the badges the application will make a call to Credly to query about student badges.&lt;br /&gt;
&lt;br /&gt;
[[File: example.jpg]]&lt;br /&gt;
Figure 1: Student Leaderboard&lt;br /&gt;
&lt;br /&gt;
The next figures are all from the perspective of an inspector or admin. In Figure 3 below an instructor may view the badges earned for a given assignment or course in which they own. They will get to his page by clicking a badges button from either the assignments or courses page. The title of the page will be the name of either the course of assignment. Like the previous figure, by clicking show badges the list of course participants will appear sorted by the number of badges they have earned. Another link, “Award Badges” will be used to manually grant a badge. When an instructor or admin clicks on the link, they will be directed to the credly page in order to grant the badge to the student.  &lt;br /&gt;
&lt;br /&gt;
[[File: example.jpg]]&lt;br /&gt;
Figure 2: Instructor assignment / course badge view&lt;br /&gt;
&lt;br /&gt;
In order to use badges for an assignment, an instructor must first enable them for the assignment. The badges will be enabled by default. The figure below shows some of the settings associated with the badges system. Instructors may choose to automatically grant badges to students based off of their performance on the assignment. When editing or creating a new assignment they may come to the new badges tab and configure how they want the badges granted. Instructors may choose to grant some number of badges to the top scores of the group defined by the number the input, or they may decide to grant badges to anyone who may achieve a score past the provided scoring threshold. &lt;br /&gt;
&lt;br /&gt;
[[File: example.jpg]]&lt;br /&gt;
Figure 3: Assignment Badge Settings&lt;br /&gt;
&lt;br /&gt;
Like assignments, courses also need to have some settings to configure badges. In Figure 4, instructors may automatically grant badges for students based on mean scores of multiple assignments throughout the course. First the instructor must check all of the assignments they would like to include in the mean then they must select a scoring strategy. Like the previous figure, they may choose between granting a badge to the top number of participants based on instructor input, or they may set a threshold on a mean score and any student who has achieved a score past the mean will be granted a badge. &lt;br /&gt;
&lt;br /&gt;
[[File: example.jpg]]&lt;br /&gt;
Figure 4: Edit Course&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
The following tables will be created to implement a solution for this project.&lt;br /&gt;
&lt;br /&gt;
1. badges table - which stores badge_id and their descriptions.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Description of the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
2. badge_users table - which stores details about what badges are assignment to a user and related details.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_user_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_id || int || Referenced from badges table&lt;br /&gt;
|-&lt;br /&gt;
| user_id || int || Referenced from users table&lt;br /&gt;
|-&lt;br /&gt;
| course_id || int || Referenced from courses table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|-&lt;br /&gt;
| is_course_badge || boolean || Whether badge is a course-badge or individual-badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
3. badge_groups - which stores information about which badges should be assigned depending on the threshold score.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| strategy || string || Describes the strategy of awarding&lt;br /&gt;
|-&lt;br /&gt;
| threshold || int || Score required to award the badge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
4. assignment_groups - which stores details about the team badges.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Column !! Type !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| assignment_group_id || int || Primary key. Auto-generated&lt;br /&gt;
|-&lt;br /&gt;
| badge_group_id || int || Referenced from badge_groups table&lt;br /&gt;
|-&lt;br /&gt;
| assignment_id || int || Referenced from assignments table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Design Pattern==&lt;br /&gt;
# MVC – The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
# DRY Principle – We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design==&lt;br /&gt;
As with most Ruby on Rails applications, this solution uses the Model-View-Controller&lt;br /&gt;
design pattern. The following diagram shows a workflow of the planned design along with the attributes and operations that are&lt;br /&gt;
relevant to the implementation of this solution.&lt;br /&gt;
&lt;br /&gt;
[[File:Cap1.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Mockups==&lt;br /&gt;
&lt;br /&gt;
Mockup goes here&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101544</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101544"/>
		<updated>2016-03-30T23:44:37Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University] using [http://rubyonrails.org/ Ruby on Rails], [http://expertiza.ncsu.edu/ Expertiza] is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [https://en.wikipedia.org/wiki/Crowdsourcing crowd-source] grading on the work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_review_strategy.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
* ''submitted_content_controller_test.rb''&lt;br /&gt;
* ''factories.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
* ''response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
The following fixtures were modified:&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''participants.yml''&lt;br /&gt;
* ''assignments.yml''&lt;br /&gt;
* ''questionnaires.yml''&lt;br /&gt;
* ''roles.yml''&lt;br /&gt;
* ''users.yml''&lt;br /&gt;
* ''assignment_questionnaires.yml''&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''responses.yml''&lt;br /&gt;
* ''teams.yml''&lt;br /&gt;
* ''teams_users.yml''&lt;br /&gt;
&lt;br /&gt;
== User Interface Walkthrough ==&lt;br /&gt;
Below are instructions that will guide users through the new functionality included in the update in order to test it. A video walkthrough may also be seen [https://www.youtube.com/watch?v=xaR8mD3t6RY here]&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment under the ''Review Strategy'' tab.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
==Testing from UI==&lt;br /&gt;
To test this application from UI, follow these steps:&lt;br /&gt;
&lt;br /&gt;
* First, for students to be able to do self-review, instructor must enable self-reviews for a given assignment. This can be done as follows:&lt;br /&gt;
&lt;br /&gt;
# Login as Instructor&lt;br /&gt;
# Click 'Manage Assignments' and search for an existing assignment/create a new assignment. In 'Review Strategy' tab of assignment option, check the box associated with 'Allow self reviews?' and hit 'Save'&lt;br /&gt;
&lt;br /&gt;
Now, as a student (part to this assignment) one gets a chance to perform self-review of their work.&lt;br /&gt;
&lt;br /&gt;
* Performing Self Review:&lt;br /&gt;
# Login as Student and select the assignment you wish to self-review&lt;br /&gt;
# In 'Your work' tab of the assignment, at the very bottom of the page you'll find an option to 'Review your work'. On clicking this button, you'll get an option to 'Begin' self-review&lt;br /&gt;
# Similar to peer-reviews, you'll have questionnaire and options to 'Save' and 'Submit' your responses&lt;br /&gt;
# If you select to 'Save' your response, in the 'Your work' tab, you'll find 'View' and 'Edit' links which will allow you to view and edit your response respectively&lt;br /&gt;
# If you click 'Submit' and submit your response (Hit 'Ok' in the prompt), in the 'Your work' tab, you'll find 'View' link which will allow you to view your submitted response.&lt;br /&gt;
&lt;br /&gt;
The links changes per round of submission (if there are multiple rounds)&lt;br /&gt;
# In submission stage, you are allowed to submit self-review and thus you can see 'Review your work button'. Upon clicking it, you'll see a 'Begin' link. On successful submission of your response, you'll have 'View' option. On successfully saving a response, you'll have 'View' and 'Edit'&lt;br /&gt;
# In review stage, you'll only have an option to 'View' your response&lt;br /&gt;
# If there are multiple rounds of submissions, then you'll have a new 'Update' option to submit a new response for new/same questionnaire (similar to peer-reviews) for all upcoming rounds of submissions.&lt;br /&gt;
# Finally, after the assignment is finished, you can 'View' your self-review.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern Usage ==&lt;br /&gt;
The self-review feature was implemented using the Model View Controller (MVC) pattern. The MVC pattern was chosen due to its current existence in the design in addition to it being a rails standard. There were no other new design patterns used in this implementation.&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes were also made to ''review_mapping_controller.rb'' in order to accommodate the new self-review feature. The following method was added to handle the creation of new self-review for team members.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
# Start self review if not started yet&lt;br /&gt;
def start_self_review&lt;br /&gt;
  assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, assignment.id, params[:reviewer_userid]])&lt;br /&gt;
&lt;br /&gt;
  begin&lt;br /&gt;
    #ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    if SelfReviewResponseMap.where(['reviewee_id = ? and reviewer_id = ?', team_id[0].t_id, params[:reviewer_id]]).first.nil?&lt;br /&gt;
      SelfReviewResponseMap.create(:reviewee_id =&amp;gt; team_id[0].t_id,&lt;br /&gt;
                               :reviewer_id =&amp;gt; params[:reviewer_id],&lt;br /&gt;
                               :reviewed_object_id =&amp;gt; assignment.id)&lt;br /&gt;
    else&lt;br /&gt;
      raise &amp;quot;Self review already assigned!&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id]&lt;br /&gt;
  rescue&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id], :msg =&amp;gt; $!&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_contributor&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  team_id = p.contributor&lt;br /&gt;
  assert_equal p.reviewee.id, team_id.id&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;reviewer_reviewee_same_team_test&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  @participant = participants(:par1)&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, @participant.parent_id, @participant.user_id])&lt;br /&gt;
  assert_equal p.reviewee.id, team_id[0].t_id&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tests may be run via the ''rake test'' command on the project download.&lt;br /&gt;
&lt;br /&gt;
== Live Demo ==&lt;br /&gt;
A live version of Expertiza, running with the self-review improvement, may be found at http://152.7.99.42:3000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
# [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza Documentation]&lt;br /&gt;
# [http://expertiza.ncsu.edu/ Expertiza Homepage]&lt;br /&gt;
# [https://github.com/saiteja09/expertiza Feature Fork]&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101543</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101543"/>
		<updated>2016-03-30T23:40:56Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Added link to live demo and youtube video&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University] using [http://rubyonrails.org/ Ruby on Rails], [http://expertiza.ncsu.edu/ Expertiza] is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [https://en.wikipedia.org/wiki/Crowdsourcing crowd-source] grading on the work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_review_strategy.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
* ''submitted_content_controller_test.rb''&lt;br /&gt;
* ''factories.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
* ''response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
The following fixtures were modified:&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''participants.yml''&lt;br /&gt;
* ''assignments.yml''&lt;br /&gt;
* ''questionnaires.yml''&lt;br /&gt;
* ''roles.yml''&lt;br /&gt;
* ''users.yml''&lt;br /&gt;
* ''assignment_questionnaires.yml''&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''responses.yml''&lt;br /&gt;
* ''teams.yml''&lt;br /&gt;
* ''teams_users.yml''&lt;br /&gt;
&lt;br /&gt;
== User Interface Walkthrough ==&lt;br /&gt;
Below are instructions that will guide users through the new functionality included in the update in order to test it. A video walkthrough may also be seen [https://www.youtube.com/watch?v=xaR8mD3t6RY here]&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment under the ''Review Strategy'' tab.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
==Testing from UI==&lt;br /&gt;
To test this application from UI, follow these steps:&lt;br /&gt;
&lt;br /&gt;
* First, for students to be able to do self-review, instructor must enable self-reviews for a given assignment. This can be done as follows:&lt;br /&gt;
&lt;br /&gt;
# Login as Instructor&lt;br /&gt;
# Click 'Manage Assignments' and search for an existing assignment/create a new assignment. In 'Review Strategy' tab of assignment option, check the box associated with 'Allow self reviews?' and hit 'Save'&lt;br /&gt;
&lt;br /&gt;
Now, as a student (part to this assignment) one gets a chance to perform self-review of their work.&lt;br /&gt;
&lt;br /&gt;
* Performing Self Review:&lt;br /&gt;
# Login as Student and select the assignment you wish to self-review&lt;br /&gt;
# In 'Your work' tab of the assignment, at the very bottom of the page you'll find an option to 'Review your work'. On clicking this button, you'll get an option to 'Begin' self-review&lt;br /&gt;
# Similar to peer-reviews, you'll have questionnaire and options to 'Save' and 'Submit' your responses&lt;br /&gt;
# If you select to 'Save' your response, in the 'Your work' tab, you'll find 'View' and 'Edit' links which will allow you to view and edit your response respectively&lt;br /&gt;
# If you click 'Submit' and submit your response (Hit 'Ok' in the prompt), in the 'Your work' tab, you'll find 'View' link which will allow you to view your submitted response.&lt;br /&gt;
&lt;br /&gt;
The links changes per round of submission (if there are multiple rounds)&lt;br /&gt;
# In submission stage, you are allowed to submit self-review and thus you can see 'Review your work button'. Upon clicking it, you'll see a 'Begin' link. On successful submission of your response, you'll have 'View' option. On successfully saving a response, you'll have 'View' and 'Edit'&lt;br /&gt;
# In review stage, you'll only have an option to 'View' your response&lt;br /&gt;
# If there are multiple rounds of submissions, then you'll have a new 'Update' option to submit a new response for new/same questionnaire (similar to peer-reviews) for all upcoming rounds of submissions.&lt;br /&gt;
# Finally, after the assignment is finished, you can 'View' your self-review.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern Usage ==&lt;br /&gt;
The self-review feature was implemented using the Model View Controller (MVC) pattern. The MVC pattern was chosen due to its current existence in the design in addition to it being a rails standard. There were no other new design patterns used in this implementation.&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes were also made to ''review_mapping_controller.rb'' in order to accommodate the new self-review feature. The following method was added to handle the creation of new self-review for team members.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
# Start self review if not started yet&lt;br /&gt;
def start_self_review&lt;br /&gt;
  assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, assignment.id, params[:reviewer_userid]])&lt;br /&gt;
&lt;br /&gt;
  begin&lt;br /&gt;
    #ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    if SelfReviewResponseMap.where(['reviewee_id = ? and reviewer_id = ?', team_id[0].t_id, params[:reviewer_id]]).first.nil?&lt;br /&gt;
      SelfReviewResponseMap.create(:reviewee_id =&amp;gt; team_id[0].t_id,&lt;br /&gt;
                               :reviewer_id =&amp;gt; params[:reviewer_id],&lt;br /&gt;
                               :reviewed_object_id =&amp;gt; assignment.id)&lt;br /&gt;
    else&lt;br /&gt;
      raise &amp;quot;Self review already assigned!&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id]&lt;br /&gt;
  rescue&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id], :msg =&amp;gt; $!&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_contributor&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  team_id = p.contributor&lt;br /&gt;
  assert_equal p.reviewee.id, team_id.id&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;reviewer_reviewee_same_team_test&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  @participant = participants(:par1)&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, @participant.parent_id, @participant.user_id])&lt;br /&gt;
  assert_equal p.reviewee.id, team_id[0].t_id&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Live Demo ==&lt;br /&gt;
A live version of Expertiza, running with the self-review improvement, may be found at http://152.7.99.42:3000/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
# [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza Documentation]&lt;br /&gt;
# [http://expertiza.ncsu.edu/ Expertiza Homepage]&lt;br /&gt;
# [https://github.com/saiteja09/expertiza Feature Fork]&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101542</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101542"/>
		<updated>2016-03-30T23:37:19Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Added more edits to conform with peer reviews&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University] using [http://rubyonrails.org/ Ruby on Rails], [http://expertiza.ncsu.edu/ Expertiza] is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [https://en.wikipedia.org/wiki/Crowdsourcing crowd-source] grading on the work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_review_strategy.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
* ''submitted_content_controller_test.rb''&lt;br /&gt;
* ''factories.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
* ''response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
The following fixtures were modified:&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''participants.yml''&lt;br /&gt;
* ''assignments.yml''&lt;br /&gt;
* ''questionnaires.yml''&lt;br /&gt;
* ''roles.yml''&lt;br /&gt;
* ''users.yml''&lt;br /&gt;
* ''assignment_questionnaires.yml''&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''responses.yml''&lt;br /&gt;
* ''teams.yml''&lt;br /&gt;
* ''teams_users.yml''&lt;br /&gt;
&lt;br /&gt;
== User Interface Walkthrough ==&lt;br /&gt;
Below are instructions that will guide users through the new functionality included in the update in order to test it.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment under the ''Review Strategy'' tab.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
==Testing from UI==&lt;br /&gt;
To test this application from UI, follow these steps:&lt;br /&gt;
&lt;br /&gt;
* First, for students to be able to do self-review, instructor must enable self-reviews for a given assignment. This can be done as follows:&lt;br /&gt;
&lt;br /&gt;
# Login as Instructor&lt;br /&gt;
# Click 'Manage Assignments' and search for an existing assignment/create a new assignment. In 'Review Strategy' tab of assignment option, check the box associated with 'Allow self reviews?' and hit 'Save'&lt;br /&gt;
&lt;br /&gt;
Now, as a student (part to this assignment) one gets a chance to perform self-review of their work.&lt;br /&gt;
&lt;br /&gt;
* Performing Self Review:&lt;br /&gt;
# Login as Student and select the assignment you wish to self-review&lt;br /&gt;
# In 'Your work' tab of the assignment, at the very bottom of the page you'll find an option to 'Review your work'. On clicking this button, you'll get an option to 'Begin' self-review&lt;br /&gt;
# Similar to peer-reviews, you'll have questionnaire and options to 'Save' and 'Submit' your responses&lt;br /&gt;
# If you select to 'Save' your response, in the 'Your work' tab, you'll find 'View' and 'Edit' links which will allow you to view and edit your response respectively&lt;br /&gt;
# If you click 'Submit' and submit your response (Hit 'Ok' in the prompt), in the 'Your work' tab, you'll find 'View' link which will allow you to view your submitted response.&lt;br /&gt;
&lt;br /&gt;
The links changes per round of submission (if there are multiple rounds)&lt;br /&gt;
# In submission stage, you are allowed to submit self-review and thus you can see 'Review your work button'. Upon clicking it, you'll see a 'Begin' link. On successful submission of your response, you'll have 'View' option. On successfully saving a response, you'll have 'View' and 'Edit'&lt;br /&gt;
# In review stage, you'll only have an option to 'View' your response&lt;br /&gt;
# If there are multiple rounds of submissions, then you'll have a new 'Update' option to submit a new response for new/same questionnaire (similar to peer-reviews) for all upcoming rounds of submissions.&lt;br /&gt;
# Finally, after the assignment is finished, you can 'View' your self-review.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern Usage ==&lt;br /&gt;
The self-review feature was implemented using the Model View Controller (MVC) pattern. The MVC pattern was chosen due to its current existence in the design in addition to it being a rails standard. There were no other new design patterns used in this implementation.&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes were also made to ''review_mapping_controller.rb'' in order to accommodate the new self-review feature. The following method was added to handle the creation of new self-review for team members.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
# Start self review if not started yet&lt;br /&gt;
def start_self_review&lt;br /&gt;
  assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, assignment.id, params[:reviewer_userid]])&lt;br /&gt;
&lt;br /&gt;
  begin&lt;br /&gt;
    #ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    if SelfReviewResponseMap.where(['reviewee_id = ? and reviewer_id = ?', team_id[0].t_id, params[:reviewer_id]]).first.nil?&lt;br /&gt;
      SelfReviewResponseMap.create(:reviewee_id =&amp;gt; team_id[0].t_id,&lt;br /&gt;
                               :reviewer_id =&amp;gt; params[:reviewer_id],&lt;br /&gt;
                               :reviewed_object_id =&amp;gt; assignment.id)&lt;br /&gt;
    else&lt;br /&gt;
      raise &amp;quot;Self review already assigned!&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id]&lt;br /&gt;
  rescue&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id], :msg =&amp;gt; $!&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_contributor&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  team_id = p.contributor&lt;br /&gt;
  assert_equal p.reviewee.id, team_id.id&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;reviewer_reviewee_same_team_test&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  @participant = participants(:par1)&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, @participant.parent_id, @participant.user_id])&lt;br /&gt;
  assert_equal p.reviewee.id, team_id[0].t_id&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
# [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza Documentation]&lt;br /&gt;
# [http://expertiza.ncsu.edu/ Expertiza Homepage]&lt;br /&gt;
# [https://github.com/saiteja09/expertiza Feature Fork]&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101541</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101541"/>
		<updated>2016-03-30T20:31:43Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: /* Walkthrough */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University] using [http://rubyonrails.org/ Ruby on Rails], [http://expertiza.ncsu.edu/ Expertiza] is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [https://en.wikipedia.org/wiki/Crowdsourcing crowd-source] grading on the work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_review_strategy.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
* ''submitted_content_controller_test.rb''&lt;br /&gt;
* ''factories.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
* ''response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
The following fixtures were modified:&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''participants.yml''&lt;br /&gt;
* ''assignments.yml''&lt;br /&gt;
* ''questionnaires.yml''&lt;br /&gt;
* ''roles.yml''&lt;br /&gt;
* ''users.yml''&lt;br /&gt;
* ''assignment_questionnaires.yml''&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''responses.yml''&lt;br /&gt;
* ''teams.yml''&lt;br /&gt;
* ''teams_users.yml''&lt;br /&gt;
&lt;br /&gt;
== User Interface Walkthrough ==&lt;br /&gt;
Below are instructions that will guide users through the new functionality included in the update in order to test it.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment under the ''Review Strategy'' tab.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes were also made to ''review_mapping_controller.rb'' in order to accommodate the new self-review feature. The following method was added to handle the creation of new self-review for team members.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
# Start self review if not started yet&lt;br /&gt;
def start_self_review&lt;br /&gt;
  assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, assignment.id, params[:reviewer_userid]])&lt;br /&gt;
&lt;br /&gt;
  begin&lt;br /&gt;
    #ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    if SelfReviewResponseMap.where(['reviewee_id = ? and reviewer_id = ?', team_id[0].t_id, params[:reviewer_id]]).first.nil?&lt;br /&gt;
      SelfReviewResponseMap.create(:reviewee_id =&amp;gt; team_id[0].t_id,&lt;br /&gt;
                               :reviewer_id =&amp;gt; params[:reviewer_id],&lt;br /&gt;
                               :reviewed_object_id =&amp;gt; assignment.id)&lt;br /&gt;
    else&lt;br /&gt;
      raise &amp;quot;Self review already assigned!&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id]&lt;br /&gt;
  rescue&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id], :msg =&amp;gt; $!&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_contributor&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  team_id = p.contributor&lt;br /&gt;
  assert_equal p.reviewee.id, team_id.id&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;reviewer_reviewee_same_team_test&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  @participant = participants(:par1)&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, @participant.parent_id, @participant.user_id])&lt;br /&gt;
  assert_equal p.reviewee.id, team_id[0].t_id&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
# [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza Documentation]&lt;br /&gt;
# [http://expertiza.ncsu.edu/ Expertiza Homepage]&lt;br /&gt;
# [https://github.com/saiteja09/expertiza Feature Fork]&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101538</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101538"/>
		<updated>2016-03-30T20:27:19Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: /* Instructor Perspective */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University] using [http://rubyonrails.org/ Ruby on Rails], [http://expertiza.ncsu.edu/ Expertiza] is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [https://en.wikipedia.org/wiki/Crowdsourcing crowd-source] grading on the work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_review_strategy.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
* ''submitted_content_controller_test.rb''&lt;br /&gt;
* ''factories.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
* ''response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
The following fixtures were modified:&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''participants.yml''&lt;br /&gt;
* ''assignments.yml''&lt;br /&gt;
* ''questionnaires.yml''&lt;br /&gt;
* ''roles.yml''&lt;br /&gt;
* ''users.yml''&lt;br /&gt;
* ''assignment_questionnaires.yml''&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''responses.yml''&lt;br /&gt;
* ''teams.yml''&lt;br /&gt;
* ''teams_users.yml''&lt;br /&gt;
&lt;br /&gt;
== Walkthrough ==&lt;br /&gt;
Below are walkthroughs that will guide users through the new functionality included in the update.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment under the ''Review Strategy'' tab.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes were also made to ''review_mapping_controller.rb'' in order to accommodate the new self-review feature. The following method was added to handle the creation of new self-review for team members.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
# Start self review if not started yet&lt;br /&gt;
def start_self_review&lt;br /&gt;
  assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, assignment.id, params[:reviewer_userid]])&lt;br /&gt;
&lt;br /&gt;
  begin&lt;br /&gt;
    #ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    if SelfReviewResponseMap.where(['reviewee_id = ? and reviewer_id = ?', team_id[0].t_id, params[:reviewer_id]]).first.nil?&lt;br /&gt;
      SelfReviewResponseMap.create(:reviewee_id =&amp;gt; team_id[0].t_id,&lt;br /&gt;
                               :reviewer_id =&amp;gt; params[:reviewer_id],&lt;br /&gt;
                               :reviewed_object_id =&amp;gt; assignment.id)&lt;br /&gt;
    else&lt;br /&gt;
      raise &amp;quot;Self review already assigned!&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id]&lt;br /&gt;
  rescue&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id], :msg =&amp;gt; $!&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_contributor&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  team_id = p.contributor&lt;br /&gt;
  assert_equal p.reviewee.id, team_id.id&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;reviewer_reviewee_same_team_test&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  @participant = participants(:par1)&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, @participant.parent_id, @participant.user_id])&lt;br /&gt;
  assert_equal p.reviewee.id, team_id[0].t_id&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
# [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza Documentation]&lt;br /&gt;
# [http://expertiza.ncsu.edu/ Expertiza Homepage]&lt;br /&gt;
# [https://github.com/saiteja09/expertiza Feature Fork]&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=101147</id>
		<title>CSC/ECE 517 Spring 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=101147"/>
		<updated>2016-03-23T17:54:10Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: /* Writing Assignment 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Calibration Assignment Submissions==&lt;br /&gt;
*[[Calibration Assignment Submission (OmniAuth)]]&lt;br /&gt;
*[[Calibration Assignment Submission (Patch_verb)]]&lt;br /&gt;
&lt;br /&gt;
==Writing Assignment 2==&lt;br /&gt;
[[CSC/ECE 517 Spring 2016/Mozilla Implement HTML5 form validation]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2016/Functional Tests for Questionnaire Controller]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature]]&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101146</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101146"/>
		<updated>2016-03-23T17:52:21Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University] using [http://rubyonrails.org/ Ruby on Rails], [http://expertiza.ncsu.edu/ Expertiza] is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [https://en.wikipedia.org/wiki/Crowdsourcing crowd-source] grading on the work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_review_strategy.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
* ''submitted_content_controller_test.rb''&lt;br /&gt;
* ''factories.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
* ''response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
The following fixtures were modified:&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''participants.yml''&lt;br /&gt;
* ''assignments.yml''&lt;br /&gt;
* ''questionnaires.yml''&lt;br /&gt;
* ''roles.yml''&lt;br /&gt;
* ''users.yml''&lt;br /&gt;
* ''assignment_questionnaires.yml''&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''responses.yml''&lt;br /&gt;
* ''teams.yml''&lt;br /&gt;
* ''teams_users.yml''&lt;br /&gt;
&lt;br /&gt;
== Walkthrough ==&lt;br /&gt;
Below are walkthroughs that will guide users through the new functionality included in the update.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes were also made to ''review_mapping_controller.rb'' in order to accommodate the new self-review feature. The following method was added to handle the creation of new self-review for team members.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
# Start self review if not started yet&lt;br /&gt;
def start_self_review&lt;br /&gt;
  assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, assignment.id, params[:reviewer_userid]])&lt;br /&gt;
&lt;br /&gt;
  begin&lt;br /&gt;
    #ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    if SelfReviewResponseMap.where(['reviewee_id = ? and reviewer_id = ?', team_id[0].t_id, params[:reviewer_id]]).first.nil?&lt;br /&gt;
      SelfReviewResponseMap.create(:reviewee_id =&amp;gt; team_id[0].t_id,&lt;br /&gt;
                               :reviewer_id =&amp;gt; params[:reviewer_id],&lt;br /&gt;
                               :reviewed_object_id =&amp;gt; assignment.id)&lt;br /&gt;
    else&lt;br /&gt;
      raise &amp;quot;Self review already assigned!&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id]&lt;br /&gt;
  rescue&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id], :msg =&amp;gt; $!&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_contributor&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  team_id = p.contributor&lt;br /&gt;
  assert_equal p.reviewee.id, team_id.id&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;reviewer_reviewee_same_team_test&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  @participant = participants(:par1)&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, @participant.parent_id, @participant.user_id])&lt;br /&gt;
  assert_equal p.reviewee.id, team_id[0].t_id&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
# [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza Documentation]&lt;br /&gt;
# [http://expertiza.ncsu.edu/ Expertiza Homepage]&lt;br /&gt;
# [https://github.com/saiteja09/expertiza Feature Fork]&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Magoff2&amp;diff=101145</id>
		<title>User:Magoff2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Magoff2&amp;diff=101145"/>
		<updated>2016-03-23T17:51:52Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: moved User:Magoff2 to CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature: In order to publish on the wiki&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature]]&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101144</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101144"/>
		<updated>2016-03-23T17:51:52Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: moved User:Magoff2 to CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature: In order to publish on the wiki&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University] using [http://rubyonrails.org/ Ruby on Rails], [http://expertiza.ncsu.edu/ Expertiza] is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [https://en.wikipedia.org/wiki/Crowdsourcing crowd-source] grading on the work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_review_strategy.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
* ''submitted_content_controller_test.rb''&lt;br /&gt;
* ''factories.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
* ''response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
The following fixtures were modified:&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''participants.yml''&lt;br /&gt;
* ''assignments.yml''&lt;br /&gt;
* ''questionnaires.yml''&lt;br /&gt;
* ''roles.yml''&lt;br /&gt;
* ''users.yml''&lt;br /&gt;
* ''assignment_questionnaires.yml''&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''responses.yml''&lt;br /&gt;
* ''teams.yml''&lt;br /&gt;
* ''teams_users.yml''&lt;br /&gt;
&lt;br /&gt;
== Walkthrough ==&lt;br /&gt;
Below are walkthroughs that will guide users through the new functionality included in the update.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes were also made to ''review_mapping_controller.rb'' in order to accommodate the new self-review feature. The following method was added to handle the creation of new self-review for team members.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
# Start self review if not started yet&lt;br /&gt;
def start_self_review&lt;br /&gt;
  assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, assignment.id, params[:reviewer_userid]])&lt;br /&gt;
&lt;br /&gt;
  begin&lt;br /&gt;
    #ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    if SelfReviewResponseMap.where(['reviewee_id = ? and reviewer_id = ?', team_id[0].t_id, params[:reviewer_id]]).first.nil?&lt;br /&gt;
      SelfReviewResponseMap.create(:reviewee_id =&amp;gt; team_id[0].t_id,&lt;br /&gt;
                               :reviewer_id =&amp;gt; params[:reviewer_id],&lt;br /&gt;
                               :reviewed_object_id =&amp;gt; assignment.id)&lt;br /&gt;
    else&lt;br /&gt;
      raise &amp;quot;Self review already assigned!&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id]&lt;br /&gt;
  rescue&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id], :msg =&amp;gt; $!&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_contributor&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  team_id = p.contributor&lt;br /&gt;
  assert_equal p.reviewee.id, team_id.id&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;reviewer_reviewee_same_team_test&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  @participant = participants(:par1)&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, @participant.parent_id, @participant.user_id])&lt;br /&gt;
  assert_equal p.reviewee.id, team_id[0].t_id&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
# [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza Documentation]&lt;br /&gt;
# [http://expertiza.ncsu.edu/ Expertiza Homepage]&lt;br /&gt;
# [https://github.com/saiteja09/expertiza Feature Fork]&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101143</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101143"/>
		<updated>2016-03-23T17:49:19Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Added another notable code section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University] using [http://rubyonrails.org/ Ruby on Rails], [http://expertiza.ncsu.edu/ Expertiza] is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [https://en.wikipedia.org/wiki/Crowdsourcing crowd-source] grading on the work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_review_strategy.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
* ''submitted_content_controller_test.rb''&lt;br /&gt;
* ''factories.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
* ''response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
The following fixtures were modified:&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''participants.yml''&lt;br /&gt;
* ''assignments.yml''&lt;br /&gt;
* ''questionnaires.yml''&lt;br /&gt;
* ''roles.yml''&lt;br /&gt;
* ''users.yml''&lt;br /&gt;
* ''assignment_questionnaires.yml''&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''responses.yml''&lt;br /&gt;
* ''teams.yml''&lt;br /&gt;
* ''teams_users.yml''&lt;br /&gt;
&lt;br /&gt;
== Walkthrough ==&lt;br /&gt;
Below are walkthroughs that will guide users through the new functionality included in the update.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes were also made to ''review_mapping_controller.rb'' in order to accommodate the new self-review feature. The following method was added to handle the creation of new self-review for team members.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
# Start self review if not started yet&lt;br /&gt;
def start_self_review&lt;br /&gt;
  assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, assignment.id, params[:reviewer_userid]])&lt;br /&gt;
&lt;br /&gt;
  begin&lt;br /&gt;
    #ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    if SelfReviewResponseMap.where(['reviewee_id = ? and reviewer_id = ?', team_id[0].t_id, params[:reviewer_id]]).first.nil?&lt;br /&gt;
      SelfReviewResponseMap.create(:reviewee_id =&amp;gt; team_id[0].t_id,&lt;br /&gt;
                               :reviewer_id =&amp;gt; params[:reviewer_id],&lt;br /&gt;
                               :reviewed_object_id =&amp;gt; assignment.id)&lt;br /&gt;
    else&lt;br /&gt;
      raise &amp;quot;Self review already assigned!&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id]&lt;br /&gt;
  rescue&lt;br /&gt;
    redirect_to :controller =&amp;gt; 'submitted_content', :action =&amp;gt; 'edit', :id =&amp;gt; params[:reviewer_id], :msg =&amp;gt; $!&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_contributor&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  team_id = p.contributor&lt;br /&gt;
  assert_equal p.reviewee.id, team_id.id&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;reviewer_reviewee_same_team_test&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  @participant = participants(:par1)&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, @participant.parent_id, @participant.user_id])&lt;br /&gt;
  assert_equal p.reviewee.id, team_id[0].t_id&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
# [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza Documentation]&lt;br /&gt;
# [http://expertiza.ncsu.edu/ Expertiza Homepage]&lt;br /&gt;
# [https://github.com/saiteja09/expertiza Feature Fork]&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101142</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101142"/>
		<updated>2016-03-23T17:43:52Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Added more changed files&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University] using [http://rubyonrails.org/ Ruby on Rails], [http://expertiza.ncsu.edu/ Expertiza] is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [https://en.wikipedia.org/wiki/Crowdsourcing crowd-source] grading on the work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_review_strategy.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
* ''submitted_content_controller_test.rb''&lt;br /&gt;
* ''factories.rb''&lt;br /&gt;
* ''test_helper.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
* ''response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
The following fixtures were modified:&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''participants.yml''&lt;br /&gt;
* ''assignments.yml''&lt;br /&gt;
* ''questionnaires.yml''&lt;br /&gt;
* ''roles.yml''&lt;br /&gt;
* ''users.yml''&lt;br /&gt;
* ''assignment_questionnaires.yml''&lt;br /&gt;
* ''response_maps.yml''&lt;br /&gt;
* ''responses.yml''&lt;br /&gt;
* ''teams.yml''&lt;br /&gt;
* ''teams_users.yml''&lt;br /&gt;
&lt;br /&gt;
== Walkthrough ==&lt;br /&gt;
Below are walkthroughs that will guide users through the new functionality included in the update.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_contributor&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  team_id = p.contributor&lt;br /&gt;
  assert_equal p.reviewee.id, team_id.id&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;reviewer_reviewee_same_team_test&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  @participant = participants(:par1)&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, @participant.parent_id, @participant.user_id])&lt;br /&gt;
  assert_equal p.reviewee.id, team_id[0].t_id&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
# [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza Documentation]&lt;br /&gt;
# [http://expertiza.ncsu.edu/ Expertiza Homepage]&lt;br /&gt;
# [https://github.com/saiteja09/expertiza Feature Fork]&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101112</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101112"/>
		<updated>2016-03-23T02:36:29Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Added more sample tests&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University] using [http://rubyonrails.org/ Ruby on Rails], [http://expertiza.ncsu.edu/ Expertiza] is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [https://en.wikipedia.org/wiki/Crowdsourcing crowd-source] grading on the work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_general.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
== Walkthrough ==&lt;br /&gt;
Below are walkthroughs that will guide users through the new functionality included in the update.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_contributor&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  team_id = p.contributor&lt;br /&gt;
  assert_equal p.reviewee.id, team_id.id&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;reviewer_reviewee_same_team_test&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  p.reviewee = teams(:team0)&lt;br /&gt;
  @participant = participants(:par1)&lt;br /&gt;
  team_id = TeamsUser.find_by_sql([&amp;quot;SELECT t.id as t_id FROM teams_users u, teams t WHERE u.team_id = t.id and t.parent_id = ? and user_id = ?&amp;quot;, @participant.parent_id, @participant.user_id])&lt;br /&gt;
  assert_equal p.reviewee.id, team_id[0].t_id&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
# [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza Documentation]&lt;br /&gt;
# [http://expertiza.ncsu.edu/ Expertiza Homepage]&lt;br /&gt;
# [https://github.com/saiteja09/expertiza Feature Fork]&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101111</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101111"/>
		<updated>2016-03-23T02:34:54Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Added some references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University] using [http://rubyonrails.org/ Ruby on Rails], [http://expertiza.ncsu.edu/ Expertiza] is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [https://en.wikipedia.org/wiki/Crowdsourcing crowd-source] grading on the work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_general.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
== Walkthrough ==&lt;br /&gt;
Below are walkthroughs that will guide users through the new functionality included in the update.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
# [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza Documentation]&lt;br /&gt;
# [http://expertiza.ncsu.edu/ Expertiza Homepage]&lt;br /&gt;
# [https://github.com/saiteja09/expertiza Feature Fork]&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101110</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101110"/>
		<updated>2016-03-23T02:31:47Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University] using [http://rubyonrails.org/ Ruby on Rails], [http://expertiza.ncsu.edu/ Expertiza] is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [https://en.wikipedia.org/wiki/Crowdsourcing crowd-source] grading on the work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_general.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
== Walkthrough ==&lt;br /&gt;
Below are walkthroughs that will guide users through the new functionality included in the update.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101109</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101109"/>
		<updated>2016-03-23T02:28:47Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University], Expertiza is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [https://en.wikipedia.org/wiki/Crowdsourcing crowd-source] grading on the work.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_general.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
== Walkthrough ==&lt;br /&gt;
Below are walkthroughs that will guide users through the new functionality included in the update.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101108</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101108"/>
		<updated>2016-03-23T01:42:45Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [[North Carolina State University]], Expertiza is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [[Crowdsourcing|crowd-source]] grading on the work. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_general.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
== Walkthrough ==&lt;br /&gt;
Below are walkthroughs that will guide users through the new functionality included in the update.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accommodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;In order to take full advantage of the new feature, instructors had to have the ability to turn it on or off as they see fit. As a result a checkbox to goggle the self-review feature was added to the assignment settings page in ''_general.html.erb''. Below is some sample code demonstrating the addition of a checkbox to the assignment settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;!-- self review flag should be the last checkbox--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;td style='padding:5px' id='assignment_is_selfreview_enabled'&amp;gt;&lt;br /&gt;
    &amp;lt;input name=&amp;quot;assignment_form[assignment][is_selfreview_enabled]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;%= check_box_tag('assignment_form[assignment][is_selfreview_enabled]', 'true', @assignment_form.assignment.is_selfreview_enabled) %&amp;gt;&lt;br /&gt;
    &amp;lt;%= label_tag('assignment_form[assignment][is_selfreview_enabled]', 'Allow self reviews?') %&amp;gt;&lt;br /&gt;
  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Tests have been added to confirm all of the new functionality, below are some test samples that were implemented with the changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;test &amp;quot;method_questionnaire&amp;quot; do&lt;br /&gt;
  @questionnaire = questionnaires(:questionnaire0)&lt;br /&gt;
  @assignment = assignments(:assignment1)&lt;br /&gt;
  reviewrespmap = SelfReviewResponseMap.new&lt;br /&gt;
  reviewrespmap.assignment = @assignment&lt;br /&gt;
  reviewrespmap.questionnaire 1&lt;br /&gt;
  assert_equal reviewrespmap.assignment.questionnaires[0].type, &amp;quot;ReviewQuestionnaire&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
test &amp;quot;method_get_title&amp;quot; do&lt;br /&gt;
  p = SelfReviewResponseMap.new&lt;br /&gt;
  assert_equal p.get_title, &amp;quot;Self Review&amp;quot;&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101107</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101107"/>
		<updated>2016-03-23T01:23:40Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Added db mod and started notable code changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [[North Carolina State University]], Expertiza is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [[Crowdsourcing|crowd-source]] grading on the work. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_general.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
== Walkthrough ==&lt;br /&gt;
Below are walkthroughs that will guide users through the new functionality included in the update.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;br /&gt;
&lt;br /&gt;
== Database modification ==&lt;br /&gt;
In order to implement the self-review feature a modification of the database was required to add the column, ''is_selfreview_enabled'', to the ''assignments'' table. Below is the new database migration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class AddColumnselfreviewenabled &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def self.up&lt;br /&gt;
    add_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def self.down&lt;br /&gt;
    remove_column :assignments, :is_selfreview_enabled, :boolean&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notable Code Changes ==&lt;br /&gt;
The largest change to the codebase to accomodate for the new self-review feature was the addition of a new type of Response Map called ''&amp;quot;SelfReviewResponseMap.&amp;quot;'' The new model class is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#E1600&lt;br /&gt;
class SelfReviewResponseMap &amp;lt; ResponseMap&lt;br /&gt;
  belongs_to :reviewee, :class_name =&amp;gt; 'Team', :foreign_key =&amp;gt; 'reviewee_id'&lt;br /&gt;
  belongs_to :assignment, :class_name =&amp;gt; 'Assignment', :foreign_key =&amp;gt; 'reviewed_object_id'&lt;br /&gt;
&lt;br /&gt;
  def questionnaire(round)&lt;br /&gt;
    if self.assignment.varying_rubrics_by_round?&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id(round))&lt;br /&gt;
    else&lt;br /&gt;
      Questionnaire.find(self.assignment.get_review_questionnaire_id)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def contributor&lt;br /&gt;
    Team.find_by_id(self.reviewee_id)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def get_title&lt;br /&gt;
    return &amp;quot;Self Review&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101042</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101042"/>
		<updated>2016-03-22T20:22:50Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: /* Student Perspective */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [[North Carolina State University]], Expertiza is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [[Crowdsourcing|crowd-source]] grading on the work. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_general.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
== Walkthrough ==&lt;br /&gt;
Below are walkthroughs that will guide users through the new functionality included in the update.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
# During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
# After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
# Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
# Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
# After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
# If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
# If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
# If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
# Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101041</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101041"/>
		<updated>2016-03-22T20:21:27Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Added walkthrough&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [[North Carolina State University]], Expertiza is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [[Crowdsourcing|crowd-source]] grading on the work. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_general.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;br /&gt;
&lt;br /&gt;
== Walkthrough ==&lt;br /&gt;
Below are walkthroughs that will guide users through the new functionality included in the update.&lt;br /&gt;
&lt;br /&gt;
=== Instructor Perspective ===&lt;br /&gt;
When creating a new assignment, an instructor will have an option to enable self-reviews. In order to allow for self-reviews to be completed, the instructor must check the box while either creating or editing the assignment.&lt;br /&gt;
&lt;br /&gt;
=== Student Perspective ===&lt;br /&gt;
If self-reviews are available on an assignment the following will be available for students to use. &lt;br /&gt;
&lt;br /&gt;
1. During the beginning stages of an assignment under &amp;quot;your work&amp;quot; the User Interface will show a label called Self-Review and a button which reads &amp;quot;Review my/our own work&amp;quot; (depending on whether it is an individual or team assignment). &lt;br /&gt;
2. After selecting &amp;quot;Review my/our own work&amp;quot; the button will change to &amp;quot;Begin&amp;quot; (just like how a peer review works).&lt;br /&gt;
3. Once the user selects &amp;quot;Begin&amp;quot; they will be taken to a questionnaire to complete. The questionnaire is the same one that a peer reviewer would complete. &lt;br /&gt;
4. Similarly to a peer review, a user may either &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; their self-review.&lt;br /&gt;
5. After a user saves a self-review, &amp;quot;View&amp;quot; and &amp;quot;Edit&amp;quot; links will appear. However, once a user submits their self-review, they will be unable to edit the peer review. &lt;br /&gt;
6. If there are multiple rounds of submissions and reviews, then in all following rounds an update link will appear to allow for students to update their self-review. &lt;br /&gt;
7. If late submissions are allowed (via Expertiza &amp;quot;submission allowed&amp;quot; flag) then a user may begin and submit self reviews even in other review stages. &lt;br /&gt;
8. If a self-review is not submitted throughout the duration of the assignment then &amp;quot;Work yet to be submitted&amp;quot; will be shown. &lt;br /&gt;
9. Scores from self-reviews will not be considered when calculating grades throughout the assignment.&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101020</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101020"/>
		<updated>2016-03-22T01:58:22Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [[North Carolina State University]], Expertiza is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [[Crowdsourcing|crowd-source]] grading on the work. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_general.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101019</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101019"/>
		<updated>2016-03-22T01:58:05Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [[North Carolina State University]], Expertiza is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [[Crowdsourcing|crowd-source]] grading on the work. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_general.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101018</id>
		<title>CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016_/_Expertiza_Self-Review_Feature&amp;diff=101018"/>
		<updated>2016-03-22T01:57:37Z</updated>

		<summary type="html">&lt;p&gt;Magoff2: Added background, problem statement and files modified&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CSC/ECE 517 Spring 2016/oss E1600 =&lt;br /&gt;
This page will discuss the newly added peer self review feature that was added to the Expertiza project.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Developed by both students and faculty at [[North Carolina State University]], Expertiza is a educational based web application that allows to students to peer review other student's work. In Expertiza, instructors are in charge of courses and within each course, they may create a series of assignments for students to contribute to, either as a member of a team or individually. Students or Teams may submit their assignments to the system through multiple means including file uploads and embedded links. Then assignments may become available to peer review by other members of the course, which provides a way to [[Crowdsourcing|crowd-source]] grading on the work. &lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Expertiza previously contained a self-review feature where student's were able to review their own work after submitting their assignments but it was removed due to the inconsistency with the other types of reviews. The task was to re-implement the feature in a way that ensured the overall design would remain intact. The self-review feature should allow students to review their own submission using the same rubric that was provided to other peer reviewers of the assignment. By reviewing their own work, students will be able to assess the artifact through the rubric and may be inspired to make improvements between rounds of peer-reviews. &lt;br /&gt;
&lt;br /&gt;
=== What Needs Done: ===&lt;br /&gt;
The following tasks were given to be completed by the team:&lt;br /&gt;
* The self-review feature should use the same questionnaire_id as a peer-review. That way developers may call &amp;quot;''assignment.get_review_questionnaire_id(round)''&amp;quot; to get a questionnaire for the self-review.&lt;br /&gt;
* A method called &amp;quot;''self_review_response_map?''&amp;quot; should be added to ''review_response_map.rb''. The method will return true if the response_map is a self_response map. In order to determine the result the method shall compare the ''reviewer_id'' and ''reviewee_id'' in the response_map record and if the participant is a member of the reviewee team, true will be returned. &lt;br /&gt;
* Student shall do a self-review in the &amp;quot;your work&amp;quot; section. There should be a button called &amp;quot;Review my own work&amp;quot; (or &amp;quot;our own work&amp;quot; if it is a team assignment). When the button is clicked a new review_response_map record is created. Within the map, the reviewer_id is the participant id and the reviewee_id is the team_id.&lt;br /&gt;
* If the response_map record for self-review exists, a hyperlink with the text &amp;quot;begin&amp;quot; should appear. A student may click the link and fill in the questionnaire just like how they would for a regular peer review. &lt;br /&gt;
* If the self-review response_map exists and there has already been a response, two links entitled &amp;quot;view&amp;quot; and &amp;quot;edit&amp;quot; will appear that will function similarly to peer reviews.&lt;br /&gt;
* If the self-review was completed in the last round and the current round uses a different questionnaire (using the ''vary_rubric_by_round'' feature), a link called &amp;quot;update&amp;quot; will appear, which brings students to a new page to fill in the new rubric for the new round.&lt;br /&gt;
* In ''grades_controller.view_my_scores,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view_team,'' self-review responses shall be excluded.&lt;br /&gt;
* In ''grades_controller.view,'' self-review responses shall be excluded.&lt;br /&gt;
* The method called &amp;quot;''add_self_reviewer&amp;quot;'' in ''ReviewMappingController'', shall allow instructors to create self-review response maps. This method needs to be made functional again. &lt;br /&gt;
* Automated tests must be created.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in Project ==&lt;br /&gt;
The following files were modified in creating the new self-review feature&lt;br /&gt;
* ''review_response_map.rb''&lt;br /&gt;
* ''review_mapping_controller.rb''&lt;br /&gt;
* ''response_controller.rb''&lt;br /&gt;
* ''_set_dynamic_review.html.erb''&lt;br /&gt;
* ''_main.html.erb''&lt;br /&gt;
* ''_general.html.erb''&lt;br /&gt;
* ''response.html.erb''&lt;br /&gt;
* ''routes.rb''&lt;br /&gt;
&lt;br /&gt;
The following files were created:&lt;br /&gt;
* ''self_review_response_map.rb''&lt;br /&gt;
* ''_self_review.html.erb''&lt;br /&gt;
* ''20160321221146_add_columnselfreviewenabled.rb''&lt;br /&gt;
&lt;br /&gt;
The following test classes were created:&lt;br /&gt;
* ''self_review_response_maps.rb''&lt;br /&gt;
* ''self_review_response_map_test.rb''&lt;/div&gt;</summary>
		<author><name>Magoff2</name></author>
	</entry>
</feed>