<?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=Srachak</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=Srachak"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Srachak"/>
	<updated>2026-09-12T04:10:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentTeamsView.png&amp;diff=131168</id>
		<title>File:StudentTeamsView.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentTeamsView.png&amp;diff=131168"/>
		<updated>2019-12-07T17:43:21Z</updated>

		<summary type="html">&lt;p&gt;Srachak: uploaded a new version of &amp;amp;quot;File:StudentTeamsView.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentTeamsView.png&amp;diff=131167</id>
		<title>File:StudentTeamsView.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentTeamsView.png&amp;diff=131167"/>
		<updated>2019-12-07T17:40:39Z</updated>

		<summary type="html">&lt;p&gt;Srachak: uploaded a new version of &amp;amp;quot;File:StudentTeamsView.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentTeamsView.png&amp;diff=131166</id>
		<title>File:StudentTeamsView.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentTeamsView.png&amp;diff=131166"/>
		<updated>2019-12-07T17:36:31Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131165</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131165"/>
		<updated>2019-12-07T17:36:12Z</updated>

		<summary type="html">&lt;p&gt;Srachak: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===Proposed Solution:===&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
===Why we chose this approach===&lt;br /&gt;
The initial idea for this project was to make use of the existing feature for self-review, when a team member reviews his/her contribution to the team. But after considering code that also involves teammate reviews, what we have observed is that every assignment has the option to render reports to the instructor - showcasing different types of reports such as Review Reports, Teammate Review Reports, Self Review Reports, Answer Tagging reports. If the existing self-review feature were to be implemented, the view for the Self Review reports would also contain self-teammate reviews, which would cause inconsistencies in rendering Self Review Reports, and does not help serve the purpose of a legible report. &lt;br /&gt;
&lt;br /&gt;
Thus, keeping self-teammate reviews as an instance of TeammateReview would help the instructor in evaluating all the reviews in one go, as the view that gets rendered is shown below: &lt;br /&gt;
[[File:ReviewReport.png|center]]&lt;br /&gt;
Here, for simplicity, the assignment - Assignment_Example can have teams with maximum of 2 participants. Consider Student8529, who has reviewed himself and his teammate Student8663. With the design approach taken for this project, when Student8529 reviews himself, the review would appear under the Teammate reviewed, under the Teammate review report. This would certainly help instructors verify reviews in a much simpler manner. The design also ensures minimal code change to existing code.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
A new class Cake has been newly introduced as a subclass of ScoredQuestion. The Cake class is a type of question that can be offered as part of any questionnaire, which keeps an account of all the answer values recorded for one specific question. The maximum value that can be given to a question of type cake is 100, and any value entered above 100 is automatically void, setting the answer entered to zero by default. The user is informed of the same and also can keep track of how much of the “cake” has already been taken, which helps him determine the value that he can enter. Upon entering a value greater than 100, a warning is displayed, informing the user that the value has exceeded 100, and setting the value back to 0. A textbox input with up-down arrows is being used, to help the user increment/decrement values as he pleases. &lt;br /&gt;
&lt;br /&gt;
The general makeup in expertiza for different type of questions is that each question has the following methods: &lt;br /&gt;
edit(_count)&lt;br /&gt;
View_question_text&lt;br /&gt;
complete()&lt;br /&gt;
view_completed_question()&lt;br /&gt;
&lt;br /&gt;
The parameters for the last two methods - complete and view_completed_question vary, depending on the type of question. These methods are responsible for rendering html code onto the view in which they are being referenced. Similarly, the following methods have been added to cake.rb :&lt;br /&gt;
&lt;br /&gt;
edit(_count)&lt;br /&gt;
[[File:EditCake.png|center]]&lt;br /&gt;
The edit method is called on the initial questionnaire creation, and the view on the browser is as shown below: &lt;br /&gt;
[[File:EditCake1.png|center]]&lt;br /&gt;
The method is invoked from the questionnaire/edit.html.erb file. &lt;br /&gt;
&lt;br /&gt;
View_question_text&lt;br /&gt;
The following code has been added to this method: &lt;br /&gt;
[[File:ViewQuestion.png|center]]&lt;br /&gt;
The method is invoked from the view questionnaire option (questionnaire/view.html.erb),  on each questionnaire, showing the text for the question, type (being cake) and weight (default 1).&lt;br /&gt;
&lt;br /&gt;
view_completed_question()&lt;br /&gt;
Snippet of the code is shown below: &lt;br /&gt;
[[File:ViewCompletedQuestion.png|center]]&lt;br /&gt;
The method is called when the user/participant wants to view or review his/her. The screen for the same when a cake type question is added to the teammate review is as shown below: &lt;br /&gt;
[[File:ViewCompletedQuestion1.png|center]]&lt;br /&gt;
The cake type question will always have a green circle in the background, rending the score on top of it. The method is called from the response/view.html.erb file. &lt;br /&gt;
&lt;br /&gt;
In order to enable a student to review him/herself as a teammate we have implemented self reviews for teammate assessment. We have incorporated a checkbox in the review strategy tab of creating/ editing an assignment which will allow the instructor to either enable or disable this feature. We added the following code to '''assignments/edit/_review_strategy.html.erb''' file as follows: &lt;br /&gt;
[[File:SelfReviewCode.png|center]]&lt;br /&gt;
&lt;br /&gt;
We also included a warning for the instructor, incase they try to enable self teammate reviews after creating the assignment and after some of the students have given their reviews. Since, enabling this feature would cause inconsistencies in data with respect to cake. For example: In teammate review assessment, let there be a cake type question about the amount of contribution provided by each team member. Previously, the cake should be split between all the other team members apart from the author. After enabling self reviews, cake has to include the author as well. &lt;br /&gt;
The warning is implemented as follows: &lt;br /&gt;
[[File:SelfReviewCode2.png|center]]&lt;br /&gt;
&lt;br /&gt;
#Edited '''student_teams/view.html.erb''' to add reviewer to list of displayed teammates and show review link if self review is enabled&lt;br /&gt;
[[File:StudentTeamsView.png|center]]&lt;br /&gt;
&lt;br /&gt;
'''Other Changes'''&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:Database.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. The capybara test creates a new questionnaire by logging into expertiza as instructor6, and adds the cake type questions to the questionnaire. &lt;br /&gt;
[[File:Testing1.png|center]]&lt;br /&gt;
&lt;br /&gt;
Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric. &lt;br /&gt;
&lt;br /&gt;
The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below: &lt;br /&gt;
[[File:Testing2.png|center]]&lt;br /&gt;
&lt;br /&gt;
With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. &lt;br /&gt;
To run and verify Rspec results, please do run the following commands from the expertiza folder: &lt;br /&gt;
&lt;br /&gt;
rspec spec/models/cake_spec.rb&lt;br /&gt;
rspec spec/features/cake_questionnaire.rb &lt;br /&gt;
&lt;br /&gt;
With the right gems installed, the test cases should ideally pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131164</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131164"/>
		<updated>2019-12-07T17:17:31Z</updated>

		<summary type="html">&lt;p&gt;Srachak: /* Notable Code changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===Proposed Solution:===&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
===Why we chose this approach===&lt;br /&gt;
The initial idea for this project was to make use of the existing feature for self-review, when a team member reviews his/her contribution to the team. But after considering code that also involves teammate reviews, what we have observed is that every assignment has the option to render reports to the instructor - showcasing different types of reports such as Review Reports, Teammate Review Reports, Self Review Reports, Answer Tagging reports. If the existing self-review feature were to be implemented, the view for the Self Review reports would also contain self-teammate reviews, which would cause inconsistencies in rendering Self Review Reports, and does not help serve the purpose of a legible report. &lt;br /&gt;
&lt;br /&gt;
Thus, keeping self-teammate reviews as an instance of TeammateReview would help the instructor in evaluating all the reviews in one go, as the view that gets rendered is shown below: &lt;br /&gt;
[[File:ReviewReport.png|center]]&lt;br /&gt;
Here, for simplicity, the assignment - Assignment_Example can have teams with maximum of 2 participants. Consider Student8529, who has reviewed himself and his teammate Student8663. With the design approach taken for this project, when Student8529 reviews himself, the review would appear under the Teammate reviewed, under the Teammate review report. This would certainly help instructors verify reviews in a much simpler manner. The design also ensures minimal code change to existing code.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
A new class Cake has been newly introduced as a subclass of ScoredQuestion. The Cake class is a type of question that can be offered as part of any questionnaire, which keeps an account of all the answer values recorded for one specific question. The maximum value that can be given to a question of type cake is 100, and any value entered above 100 is automatically void, setting the answer entered to zero by default. The user is informed of the same and also can keep track of how much of the “cake” has already been taken, which helps him determine the value that he can enter. Upon entering a value greater than 100, a warning is displayed, informing the user that the value has exceeded 100, and setting the value back to 0. A textbox input with up-down arrows is being used, to help the user increment/decrement values as he pleases. &lt;br /&gt;
&lt;br /&gt;
The general makeup in expertiza for different type of questions is that each question has the following methods: &lt;br /&gt;
edit(_count)&lt;br /&gt;
View_question_text&lt;br /&gt;
complete()&lt;br /&gt;
view_completed_question()&lt;br /&gt;
&lt;br /&gt;
The parameters for the last two methods - complete and view_completed_question vary, depending on the type of question. These methods are responsible for rendering html code onto the view in which they are being referenced. Similarly, the following methods have been added to cake.rb :&lt;br /&gt;
&lt;br /&gt;
edit(_count)&lt;br /&gt;
[[File:EditCake.png|center]]&lt;br /&gt;
The edit method is called on the initial questionnaire creation, and the view on the browser is as shown below: &lt;br /&gt;
[[File:EditCake1.png|center]]&lt;br /&gt;
The method is invoked from the questionnaire/edit.html.erb file. &lt;br /&gt;
&lt;br /&gt;
View_question_text&lt;br /&gt;
The following code has been added to this method: &lt;br /&gt;
[[File:ViewQuestion.png|center]]&lt;br /&gt;
The method is invoked from the view questionnaire option (questionnaire/view.html.erb),  on each questionnaire, showing the text for the question, type (being cake) and weight (default 1).&lt;br /&gt;
&lt;br /&gt;
view_completed_question()&lt;br /&gt;
Snippet of the code is shown below: &lt;br /&gt;
[[File:ViewCompletedQuestion.png|center]]&lt;br /&gt;
The method is called when the user/participant wants to view or review his/her. The screen for the same when a cake type question is added to the teammate review is as shown below: &lt;br /&gt;
[[File:ViewCompletedQuestion1.png|center]]&lt;br /&gt;
The cake type question will always have a green circle in the background, rending the score on top of it. The method is called from the response/view.html.erb file. &lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' to add ‘Add self to teammate review’ to the list of options:&lt;br /&gt;
[[File:SelfReviewCode.png|center]]&lt;br /&gt;
Warn the instructor when they enable self reviews after students have started giving reviews&lt;br /&gt;
[[File:SelfReviewCode2.png|center]]&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:Database.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. The capybara test creates a new questionnaire by logging into expertiza as instructor6, and adds the cake type questions to the questionnaire. &lt;br /&gt;
[[File:Testing1.png|center]]&lt;br /&gt;
&lt;br /&gt;
Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric. &lt;br /&gt;
&lt;br /&gt;
The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below: &lt;br /&gt;
[[File:Testing2.png|center]]&lt;br /&gt;
&lt;br /&gt;
With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. &lt;br /&gt;
To run and verify Rspec results, please do run the following commands from the expertiza folder: &lt;br /&gt;
&lt;br /&gt;
rspec spec/models/cake_spec.rb&lt;br /&gt;
rspec spec/features/cake_questionnaire.rb &lt;br /&gt;
&lt;br /&gt;
With the right gems installed, the test cases should ideally pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131163</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131163"/>
		<updated>2019-12-07T17:17:18Z</updated>

		<summary type="html">&lt;p&gt;Srachak: /* Design &amp;amp; Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===Proposed Solution:===&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
===Why we chose this approach===&lt;br /&gt;
The initial idea for this project was to make use of the existing feature for self-review, when a team member reviews his/her contribution to the team. But after considering code that also involves teammate reviews, what we have observed is that every assignment has the option to render reports to the instructor - showcasing different types of reports such as Review Reports, Teammate Review Reports, Self Review Reports, Answer Tagging reports. If the existing self-review feature were to be implemented, the view for the Self Review reports would also contain self-teammate reviews, which would cause inconsistencies in rendering Self Review Reports, and does not help serve the purpose of a legible report. &lt;br /&gt;
&lt;br /&gt;
Thus, keeping self-teammate reviews as an instance of TeammateReview would help the instructor in evaluating all the reviews in one go, as the view that gets rendered is shown below: &lt;br /&gt;
[[File:ReviewReport.png|center]]&lt;br /&gt;
Here, for simplicity, the assignment - Assignment_Example can have teams with maximum of 2 participants. Consider Student8529, who has reviewed himself and his teammate Student8663. With the design approach taken for this project, when Student8529 reviews himself, the review would appear under the Teammate reviewed, under the Teammate review report. This would certainly help instructors verify reviews in a much simpler manner. The design also ensures minimal code change to existing code.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Notable Code changes==&lt;br /&gt;
A new class Cake has been newly introduced as a subclass of ScoredQuestion. The Cake class is a type of question that can be offered as part of any questionnaire, which keeps an account of all the answer values recorded for one specific question. The maximum value that can be given to a question of type cake is 100, and any value entered above 100 is automatically void, setting the answer entered to zero by default. The user is informed of the same and also can keep track of how much of the “cake” has already been taken, which helps him determine the value that he can enter. Upon entering a value greater than 100, a warning is displayed, informing the user that the value has exceeded 100, and setting the value back to 0. A textbox input with up-down arrows is being used, to help the user increment/decrement values as he pleases. &lt;br /&gt;
&lt;br /&gt;
The general makeup in expertiza for different type of questions is that each question has the following methods: &lt;br /&gt;
edit(_count)&lt;br /&gt;
View_question_text&lt;br /&gt;
complete()&lt;br /&gt;
view_completed_question()&lt;br /&gt;
&lt;br /&gt;
The parameters for the last two methods - complete and view_completed_question vary, depending on the type of question. These methods are responsible for rendering html code onto the view in which they are being referenced. Similarly, the following methods have been added to cake.rb :&lt;br /&gt;
&lt;br /&gt;
edit(_count)&lt;br /&gt;
[[File:EditCake.png|center]]&lt;br /&gt;
The edit method is called on the initial questionnaire creation, and the view on the browser is as shown below: &lt;br /&gt;
[[File:EditCake1.png|center]]&lt;br /&gt;
The method is invoked from the questionnaire/edit.html.erb file. &lt;br /&gt;
&lt;br /&gt;
View_question_text&lt;br /&gt;
The following code has been added to this method: &lt;br /&gt;
[[File:ViewQuestion.png|center]]&lt;br /&gt;
The method is invoked from the view questionnaire option (questionnaire/view.html.erb),  on each questionnaire, showing the text for the question, type (being cake) and weight (default 1).&lt;br /&gt;
&lt;br /&gt;
view_completed_question()&lt;br /&gt;
Snippet of the code is shown below: &lt;br /&gt;
[[File:ViewCompletedQuestion.png|center]]&lt;br /&gt;
The method is called when the user/participant wants to view or review his/her. The screen for the same when a cake type question is added to the teammate review is as shown below: &lt;br /&gt;
[[File:ViewCompletedQuestion1.png|center]]&lt;br /&gt;
The cake type question will always have a green circle in the background, rending the score on top of it. The method is called from the response/view.html.erb file. &lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' to add ‘Add self to teammate review’ to the list of options:&lt;br /&gt;
[[File:SelfReviewCode.png|center]]&lt;br /&gt;
Warn the instructor when they enable self reviews after students have started giving reviews&lt;br /&gt;
[[File:SelfReviewCode2.png|center]]&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:Database.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. The capybara test creates a new questionnaire by logging into expertiza as instructor6, and adds the cake type questions to the questionnaire. &lt;br /&gt;
[[File:Testing1.png|center]]&lt;br /&gt;
&lt;br /&gt;
Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric. &lt;br /&gt;
&lt;br /&gt;
The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below: &lt;br /&gt;
[[File:Testing2.png|center]]&lt;br /&gt;
&lt;br /&gt;
With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. &lt;br /&gt;
To run and verify Rspec results, please do run the following commands from the expertiza folder: &lt;br /&gt;
&lt;br /&gt;
rspec spec/models/cake_spec.rb&lt;br /&gt;
rspec spec/features/cake_questionnaire.rb &lt;br /&gt;
&lt;br /&gt;
With the right gems installed, the test cases should ideally pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ViewCompletedQuestion1.png&amp;diff=131162</id>
		<title>File:ViewCompletedQuestion1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ViewCompletedQuestion1.png&amp;diff=131162"/>
		<updated>2019-12-07T16:47:28Z</updated>

		<summary type="html">&lt;p&gt;Srachak: uploaded a new version of &amp;amp;quot;File:ViewCompletedQuestion1.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ViewCompletedQuestion.png&amp;diff=131161</id>
		<title>File:ViewCompletedQuestion.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ViewCompletedQuestion.png&amp;diff=131161"/>
		<updated>2019-12-07T16:47:16Z</updated>

		<summary type="html">&lt;p&gt;Srachak: uploaded a new version of &amp;amp;quot;File:ViewCompletedQuestion.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;view cmp&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ViewQuestion.png&amp;diff=131160</id>
		<title>File:ViewQuestion.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ViewQuestion.png&amp;diff=131160"/>
		<updated>2019-12-07T16:47:03Z</updated>

		<summary type="html">&lt;p&gt;Srachak: uploaded a new version of &amp;amp;quot;File:ViewQuestion.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;view q&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:EditCake1.png&amp;diff=131159</id>
		<title>File:EditCake1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:EditCake1.png&amp;diff=131159"/>
		<updated>2019-12-07T16:41:46Z</updated>

		<summary type="html">&lt;p&gt;Srachak: uploaded a new version of &amp;amp;quot;File:EditCake1.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;edit 2&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:EditCake.png&amp;diff=131158</id>
		<title>File:EditCake.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:EditCake.png&amp;diff=131158"/>
		<updated>2019-12-07T16:41:19Z</updated>

		<summary type="html">&lt;p&gt;Srachak: uploaded a new version of &amp;amp;quot;File:EditCake.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;editcake&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:SelfReviewCode2.png&amp;diff=131157</id>
		<title>File:SelfReviewCode2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:SelfReviewCode2.png&amp;diff=131157"/>
		<updated>2019-12-07T16:38:20Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:SelfReviewCode.png&amp;diff=131156</id>
		<title>File:SelfReviewCode.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:SelfReviewCode.png&amp;diff=131156"/>
		<updated>2019-12-07T16:38:01Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ViewCompletedQuestion1.png&amp;diff=131155</id>
		<title>File:ViewCompletedQuestion1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ViewCompletedQuestion1.png&amp;diff=131155"/>
		<updated>2019-12-07T16:37:44Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ViewCompletedQuestion.png&amp;diff=131154</id>
		<title>File:ViewCompletedQuestion.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ViewCompletedQuestion.png&amp;diff=131154"/>
		<updated>2019-12-07T16:37:13Z</updated>

		<summary type="html">&lt;p&gt;Srachak: view cmp&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;view cmp&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ViewQuestion.png&amp;diff=131153</id>
		<title>File:ViewQuestion.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ViewQuestion.png&amp;diff=131153"/>
		<updated>2019-12-07T16:36:52Z</updated>

		<summary type="html">&lt;p&gt;Srachak: view q&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;view q&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:EditCake1.png&amp;diff=131152</id>
		<title>File:EditCake1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:EditCake1.png&amp;diff=131152"/>
		<updated>2019-12-07T16:36:24Z</updated>

		<summary type="html">&lt;p&gt;Srachak: edit 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;edit 2&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:EditCake.png&amp;diff=131151</id>
		<title>File:EditCake.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:EditCake.png&amp;diff=131151"/>
		<updated>2019-12-07T16:36:09Z</updated>

		<summary type="html">&lt;p&gt;Srachak: editcake&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;editcake&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131150</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131150"/>
		<updated>2019-12-07T16:29:07Z</updated>

		<summary type="html">&lt;p&gt;Srachak: /* Files Modified in the Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Design &amp;amp; Implementation==&lt;br /&gt;
===Proposed Solution:===&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
===Why we chose this approach===&lt;br /&gt;
The initial idea for this project was to make use of the existing feature for self-review, when a team member reviews his/her contribution to the team. But after considering code that also involves teammate reviews, what we have observed is that every assignment has the option to render reports to the instructor - showcasing different types of reports such as Review Reports, Teammate Review Reports, Self Review Reports, Answer Tagging reports. If the existing self-review feature were to be implemented, the view for the Self Review reports would also contain self-teammate reviews, which would cause inconsistencies in rendering Self Review Reports, and does not help serve the purpose of a legible report. &lt;br /&gt;
&lt;br /&gt;
Thus, keeping self-teammate reviews as an instance of TeammateReview would help the instructor in evaluating all the reviews in one go, as the view that gets rendered is shown below: &lt;br /&gt;
[[File:ReviewReport.png|center]]&lt;br /&gt;
Here, for simplicity, the assignment - Assignment_Example can have teams with maximum of 2 participants. Consider Student8529, who has reviewed himself and his teammate Student8663. With the design approach taken for this project, when Student8529 reviews himself, the review would appear under the Teammate reviewed, under the Teammate review report. This would certainly help instructors verify reviews in a much simpler manner. The design also ensures minimal code change to existing code.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Notable Code changes==&lt;br /&gt;
A new class Cake has been newly introduced as a subclass of ScoredQuestion. The Cake class is a type of question that can be offered as part of any questionnaire, which keeps an account of all the answer values recorded for one specific question. The maximum value that can be given to a question of type cake is 100, and any value entered above 100 is automatically void, setting the answer entered to zero by default. The user is informed of the same and also can keep track of how much of the “cake” has already been taken, which helps him determine the value that he can enter. Upon entering a value greater than 100, a warning is displayed, informing the user that the value has exceeded 100, and setting the value back to 0. A textbox input with up-down arrows is being used, to help the user increment/decrement values as he pleases. &lt;br /&gt;
&lt;br /&gt;
The general makeup in expertiza for different type of questions is that each question has the following methods: &lt;br /&gt;
edit(_count)&lt;br /&gt;
View_question_text&lt;br /&gt;
complete()&lt;br /&gt;
view_completed_question()&lt;br /&gt;
&lt;br /&gt;
The parameters for the last two methods - complete and view_completed_question vary, depending on the type of question. These methods are responsible for rendering html code onto the view in which they are being referenced. Similarly, the following methods have been added to cake.rb :&lt;br /&gt;
&lt;br /&gt;
edit(_count)&lt;br /&gt;
[[File:EditCake.png|center]]&lt;br /&gt;
The edit method is called on the initial questionnaire creation, and the view on the browser is as shown below: &lt;br /&gt;
[[File:EditCake1.png|center]]&lt;br /&gt;
The method is invoked from the questionnaire/edit.html.erb file. &lt;br /&gt;
&lt;br /&gt;
View_question_text&lt;br /&gt;
The following code has been added to this method: &lt;br /&gt;
[[File:ViewQuestion.png|center]]&lt;br /&gt;
The method is invoked from the view questionnaire option (questionnaire/view.html.erb),  on each questionnaire, showing the text for the question, type (being cake) and weight (default 1).&lt;br /&gt;
&lt;br /&gt;
view_completed_question()&lt;br /&gt;
Snippet of the code is shown below: &lt;br /&gt;
[[File:ViewCompletedQuestion.png|center]]&lt;br /&gt;
The method is called when the user/participant wants to view or review his/her. The screen for the same when a cake type question is added to the teammate review is as shown below: &lt;br /&gt;
[[File:ViewCompletedQuestion1.png|center]]&lt;br /&gt;
The cake type question will always have a green circle in the background, rending the score on top of it. The method is called from the response/view.html.erb file. &lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' to add ‘Add self to teammate review’ to the list of options:&lt;br /&gt;
[[File:SelfReviewCode.png|center]]&lt;br /&gt;
Warn the instructor when they enable self reviews after students have started giving reviews&lt;br /&gt;
[[File:SelfReviewCode2.png|center]]&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:Database.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. The capybara test creates a new questionnaire by logging into expertiza as instructor6, and adds the cake type questions to the questionnaire. &lt;br /&gt;
[[File:Testing1.png|center]]&lt;br /&gt;
&lt;br /&gt;
Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric. &lt;br /&gt;
&lt;br /&gt;
The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below: &lt;br /&gt;
[[File:Testing2.png|center]]&lt;br /&gt;
&lt;br /&gt;
With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. &lt;br /&gt;
To run and verify Rspec results, please do run the following commands from the expertiza folder: &lt;br /&gt;
&lt;br /&gt;
rspec spec/models/cake_spec.rb&lt;br /&gt;
rspec spec/features/cake_questionnaire.rb &lt;br /&gt;
&lt;br /&gt;
With the right gems installed, the test cases should ideally pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131149</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131149"/>
		<updated>2019-12-07T16:20:49Z</updated>

		<summary type="html">&lt;p&gt;Srachak: /* Proposed Solution: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Design &amp;amp; Implementation==&lt;br /&gt;
===Proposed Solution:===&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
===Why we chose this approach===&lt;br /&gt;
The initial idea for this project was to make use of the existing feature for self-review, when a team member reviews his/her contribution to the team. But after considering code that also involves teammate reviews, what we have observed is that every assignment has the option to render reports to the instructor - showcasing different types of reports such as Review Reports, Teammate Review Reports, Self Review Reports, Answer Tagging reports. If the existing self-review feature were to be implemented, the view for the Self Review reports would also contain self-teammate reviews, which would cause inconsistencies in rendering Self Review Reports, and does not help serve the purpose of a legible report. &lt;br /&gt;
&lt;br /&gt;
Thus, keeping self-teammate reviews as an instance of TeammateReview would help the instructor in evaluating all the reviews in one go, as the view that gets rendered is shown below: &lt;br /&gt;
[[File:ReviewReport.png|center]]&lt;br /&gt;
Here, for simplicity, the assignment - Assignment_Example can have teams with maximum of 2 participants. Consider Student8529, who has reviewed himself and his teammate Student8663. With the design approach taken for this project, when Student8529 reviews himself, the review would appear under the Teammate reviewed, under the Teammate review report. This would certainly help instructors verify reviews in a much simpler manner. The design also ensures minimal code change to existing code.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Files Modified in the Project==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:Database.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. The capybara test creates a new questionnaire by logging into expertiza as instructor6, and adds the cake type questions to the questionnaire. &lt;br /&gt;
[[File:Testing1.png|center]]&lt;br /&gt;
&lt;br /&gt;
Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric. &lt;br /&gt;
&lt;br /&gt;
The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below: &lt;br /&gt;
[[File:Testing2.png|center]]&lt;br /&gt;
&lt;br /&gt;
With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. &lt;br /&gt;
To run and verify Rspec results, please do run the following commands from the expertiza folder: &lt;br /&gt;
&lt;br /&gt;
rspec spec/models/cake_spec.rb&lt;br /&gt;
rspec spec/features/cake_questionnaire.rb &lt;br /&gt;
&lt;br /&gt;
With the right gems installed, the test cases should ideally pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131148</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131148"/>
		<updated>2019-12-07T16:19:39Z</updated>

		<summary type="html">&lt;p&gt;Srachak: /* Why we chose this approach */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Design &amp;amp; Implementation==&lt;br /&gt;
===Proposed Solution:===&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
===Why we chose this approach===&lt;br /&gt;
The initial idea for this project was to make use of the existing feature for self-review, when a team member reviews his/her contribution to the team. But after considering code that also involves teammate reviews, what we have observed is that every assignment has the option to render reports to the instructor - showcasing different types of reports such as Review Reports, Teammate Review Reports, Self Review Reports, Answer Tagging reports. If the existing self-review feature were to be implemented, the view for the Self Review reports would also contain self-teammate reviews, which would cause inconsistencies in rendering Self Review Reports, and does not help serve the purpose of a legible report. &lt;br /&gt;
&lt;br /&gt;
Thus, keeping self-teammate reviews as an instance of TeammateReview would help the instructor in evaluating all the reviews in one go, as the view that gets rendered is shown below: &lt;br /&gt;
[[File:ReviewReport.png|center]]&lt;br /&gt;
Here, for simplicity, the assignment - Assignment_Example can have teams with maximum of 2 participants. Consider Student8529, who has reviewed himself and his teammate Student8663. With the design approach taken for this project, when Student8529 reviews himself, the review would appear under the Teammate reviewed, under the Teammate review report. This would certainly help instructors verify reviews in a much simpler manner. The design also ensures minimal code change to existing code.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Files Modified in the Project==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:Database.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. The capybara test creates a new questionnaire by logging into expertiza as instructor6, and adds the cake type questions to the questionnaire. &lt;br /&gt;
[[File:Testing1.png|center]]&lt;br /&gt;
&lt;br /&gt;
Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric. &lt;br /&gt;
&lt;br /&gt;
The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below: &lt;br /&gt;
[[File:Testing2.png|center]]&lt;br /&gt;
&lt;br /&gt;
With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. &lt;br /&gt;
To run and verify Rspec results, please do run the following commands from the expertiza folder: &lt;br /&gt;
&lt;br /&gt;
rspec spec/models/cake_spec.rb&lt;br /&gt;
rspec spec/features/cake_questionnaire.rb &lt;br /&gt;
&lt;br /&gt;
With the right gems installed, the test cases should ideally pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131146</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131146"/>
		<updated>2019-12-07T15:07:03Z</updated>

		<summary type="html">&lt;p&gt;Srachak: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Design &amp;amp; Implementation==&lt;br /&gt;
===Proposed Solution:===&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
===Why we chose this approach===&lt;br /&gt;
The initial idea for this project was to make use of the existing feature for self-review, when a team member reviews his/her contribution to the team. But after considering code that also involves teammate reviews, what we have observed is that every assignment has the option to render reports to the instructor - showcasing different types of reports such as Review Reports, Teammate Review Reports, Self Review Reports, Answer Tagging reports. If the existing self-review feature were to be implemented, the view for the Self Review reports would also contain self-teammate reviews, which would cause inconsistencies in rendering Self Review Reports, and does not help serve the purpose of a legible report. &lt;br /&gt;
&lt;br /&gt;
Thus, keeping self-teammate reviews as an instance of TeammateReview would help the instructor in evaluating all the reviews in one go, as the view that gets rendered is shown below: &lt;br /&gt;
[[File:ReviewReport.png|center]]&lt;br /&gt;
Here, for simplicity, the assignment - Assignment_Example can have teams with maximum of 2 participants. Consider Student8529, who has reviewed himself and his teammate Student8663. With the design approach taken for this project, when Student8529 reviews himself, the review would appear under the Teammate reviewed, under the Teammate review report. This would certainly help instructors verify reviews in a much simpler manner. The design also ensures minimal code change to existing code. &lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Files Modified in the Project==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:Database.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. The capybara test creates a new questionnaire by logging into expertiza as instructor6, and adds the cake type questions to the questionnaire. &lt;br /&gt;
[[File:Testing1.png|center]]&lt;br /&gt;
&lt;br /&gt;
Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric. &lt;br /&gt;
&lt;br /&gt;
The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below: &lt;br /&gt;
[[File:Testing2.png|center]]&lt;br /&gt;
&lt;br /&gt;
With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. &lt;br /&gt;
To run and verify Rspec results, please do run the following commands from the expertiza folder: &lt;br /&gt;
&lt;br /&gt;
rspec spec/models/cake_spec.rb&lt;br /&gt;
rspec spec/features/cake_questionnaire.rb &lt;br /&gt;
&lt;br /&gt;
With the right gems installed, the test cases should ideally pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131145</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131145"/>
		<updated>2019-12-07T14:59:50Z</updated>

		<summary type="html">&lt;p&gt;Srachak: /* Proposed Solution: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Design &amp;amp; Implementation==&lt;br /&gt;
===Proposed Solution:===&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
===Why we chose this approach===&lt;br /&gt;
The initial idea for this project was to make use of the existing feature for self-review, when a team member reviews his/her contribution to the team. But after considering code that also involves teammate reviews, what we have observed is that every assignment has the option to render reports to the instructor - showcasing different types of reports such as Review Reports, Teammate Review Reports, Self Review Reports, Answer Tagging reports. If the existing self-review feature were to be implemented, the view for the Self Review reports would also contain self-teammate reviews, which would cause inconsistencies in rendering Self Review Reports, and does not help serve the purpose of a legible report. &lt;br /&gt;
&lt;br /&gt;
Thus, keeping self-teammate reviews as an instance of TeammateReview would help the instructor in evaluating all the reviews in one go, as the view that gets rendered is shown below: &lt;br /&gt;
[[File:ReviewReport.png|center]]&lt;br /&gt;
Here, for simplicity, the assignment - Assignment_Example can have teams with maximum of 2 participants. Consider Student8529, who has reviewed himself and his teammate Student8663. With the design approach taken for this project, when Student8529 reviews himself, the review would appear under the Teammate reviewed, under the Teammate review report. This would certainly help instructors verify reviews in a much simpler manner. The design also ensures minimal code change to existing code. &lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Files Modified in the Project==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:Database.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. The capybara test creates a new questionnaire by logging into expertiza as instructor6, and adds the cake type questions to the questionnaire. &lt;br /&gt;
[[File:Testing1.png|center]]&lt;br /&gt;
&lt;br /&gt;
Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric. &lt;br /&gt;
&lt;br /&gt;
The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below: &lt;br /&gt;
[[File:Testing2.png|center]]&lt;br /&gt;
&lt;br /&gt;
With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. &lt;br /&gt;
To run and verify Rspec results, please do run the following commands from the expertiza folder: &lt;br /&gt;
&lt;br /&gt;
rspec spec/models/cake_spec.rb&lt;br /&gt;
rspec spec/features/cake_questionnaire.rb &lt;br /&gt;
&lt;br /&gt;
With the right gems installed, the test cases should ideally pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131144</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131144"/>
		<updated>2019-12-07T14:59:29Z</updated>

		<summary type="html">&lt;p&gt;Srachak: /* Why we chose this approach */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Design &amp;amp; Implementation==&lt;br /&gt;
===Proposed Solution:===&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
===Why we chose this approach===&lt;br /&gt;
The initial idea for this project was to make use of the existing feature for self-review, when a team member reviews his/her contribution to the team. But after considering code that also involves teammate reviews, what we have observed is that every assignment has the option to render reports to the instructor - showcasing different types of reports such as Review Reports, Teammate Review Reports, Self Review Reports, Answer Tagging reports. If the existing self-review feature were to be implemented, the view for the Self Review reports would also contain self-teammate reviews, which would cause inconsistencies in rendering Self Review Reports, and does not help serve the purpose of a legible report. &lt;br /&gt;
&lt;br /&gt;
Thus, keeping self-teammate reviews as an instance of TeammateReview would help the instructor in evaluating all the reviews in one go, as the view that gets rendered is shown below: &lt;br /&gt;
[[File:ReviewReport.png|center]]&lt;br /&gt;
Here, for simplicity, the assignment - Assignment_Example can have teams with maximum of 2 participants. Consider Student8529, who has reviewed himself and his teammate Student8663. With the design approach taken for this project, when Student8529 reviews himself, the review would appear under the Teammate reviewed, under the Teammate review report. This would certainly help instructors verify reviews in a much simpler manner. The design also ensures minimal code change to existing code. &lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Files Modified in the Project==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:Database.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. The capybara test creates a new questionnaire by logging into expertiza as instructor6, and adds the cake type questions to the questionnaire. &lt;br /&gt;
[[File:Testing1.png|center]]&lt;br /&gt;
&lt;br /&gt;
Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric. &lt;br /&gt;
&lt;br /&gt;
The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below: &lt;br /&gt;
[[File:Testing2.png|center]]&lt;br /&gt;
&lt;br /&gt;
With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. &lt;br /&gt;
To run and verify Rspec results, please do run the following commands from the expertiza folder: &lt;br /&gt;
&lt;br /&gt;
rspec spec/models/cake_spec.rb&lt;br /&gt;
rspec spec/features/cake_questionnaire.rb &lt;br /&gt;
&lt;br /&gt;
With the right gems installed, the test cases should ideally pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ReviewReport.png&amp;diff=131143</id>
		<title>File:ReviewReport.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ReviewReport.png&amp;diff=131143"/>
		<updated>2019-12-07T14:58:57Z</updated>

		<summary type="html">&lt;p&gt;Srachak: uploaded a new version of &amp;amp;quot;File:ReviewReport.png&amp;amp;quot;: hello&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Report for self review and teammate review&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131142</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131142"/>
		<updated>2019-12-07T14:58:23Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Design &amp;amp; Implementation==&lt;br /&gt;
===Proposed Solution:===&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
==Why we chose this approach==&lt;br /&gt;
The initial idea for this project was to make use of the existing feature for self-review, when a team member reviews his/her contribution to the team. But after considering code that also involves teammate reviews, what we have observed is that every assignment has the option to render reports to the instructor - showcasing different types of reports such as Review Reports, Teammate Review Reports, Self Review Reports, Answer Tagging reports. If the existing self-review feature were to be implemented, the view for the Self Review reports would also contain self-teammate reviews, which would cause inconsistencies in rendering Self Review Reports, and does not help serve the purpose of a legible report. &lt;br /&gt;
&lt;br /&gt;
Thus, keeping self-teammate reviews as an instance of TeammateReview would help the instructor in evaluating all the reviews in one go, as the view that gets rendered is shown below: &lt;br /&gt;
[[File:ReviewReport.png|center]]&lt;br /&gt;
Here, for simplicity, the assignment - Assignment_Example can have teams with maximum of 2 participants. Consider Student8529, who has reviewed himself and his teammate Student8663. With the design approach taken for this project, when Student8529 reviews himself, the review would appear under the Teammate reviewed, under the Teammate review report. This would certainly help instructors verify reviews in a much simpler manner. The design also ensures minimal code change to existing code. &lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Files Modified in the Project==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:Database.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. The capybara test creates a new questionnaire by logging into expertiza as instructor6, and adds the cake type questions to the questionnaire. &lt;br /&gt;
[[File:Testing1.png|center]]&lt;br /&gt;
&lt;br /&gt;
Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric. &lt;br /&gt;
&lt;br /&gt;
The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below: &lt;br /&gt;
[[File:Testing2.png|center]]&lt;br /&gt;
&lt;br /&gt;
With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. &lt;br /&gt;
To run and verify Rspec results, please do run the following commands from the expertiza folder: &lt;br /&gt;
&lt;br /&gt;
rspec spec/models/cake_spec.rb&lt;br /&gt;
rspec spec/features/cake_questionnaire.rb &lt;br /&gt;
&lt;br /&gt;
With the right gems installed, the test cases should ideally pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Testing2.png&amp;diff=131141</id>
		<title>File:Testing2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Testing2.png&amp;diff=131141"/>
		<updated>2019-12-07T14:52:35Z</updated>

		<summary type="html">&lt;p&gt;Srachak: uploaded a new version of &amp;amp;quot;File:Testing2.png&amp;amp;quot;: hi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Testing2&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131140</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131140"/>
		<updated>2019-12-07T14:51:33Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
Proposed Solution:&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
*'''Solution B''': Self-review at team level as an instance of SelfReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. &lt;br /&gt;
We can make use of the existing self review code and extend it to teammate reviews as well. &lt;br /&gt;
&lt;br /&gt;
In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”&lt;br /&gt;
&lt;br /&gt;
We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your work&lt;br /&gt;
#Click on self review button at the bottom of the page&lt;br /&gt;
#You will see a new “self teammate review” link here&lt;br /&gt;
#Clicking on the button will render the questionnaire &lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Files Modified in the Project==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:Database.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. The capybara test creates a new questionnaire by logging into expertiza as instructor6, and adds the cake type questions to the questionnaire. &lt;br /&gt;
[[File:Testing1.png|center]]&lt;br /&gt;
&lt;br /&gt;
Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric. &lt;br /&gt;
&lt;br /&gt;
The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below: &lt;br /&gt;
[[File:Testing2.png|center]]&lt;br /&gt;
&lt;br /&gt;
With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. &lt;br /&gt;
To run and verify Rspec results, please do run the following commands from the expertiza folder: &lt;br /&gt;
&lt;br /&gt;
rspec spec/models/cake_spec.rb&lt;br /&gt;
rspec spec/features/cake_questionnaire.rb &lt;br /&gt;
&lt;br /&gt;
With the right gems installed, the test cases should ideally pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ReviewReport.png&amp;diff=131139</id>
		<title>File:ReviewReport.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ReviewReport.png&amp;diff=131139"/>
		<updated>2019-12-07T14:51:03Z</updated>

		<summary type="html">&lt;p&gt;Srachak: Report for self review and teammate review&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Report for self review and teammate review&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Testing2.png&amp;diff=131138</id>
		<title>File:Testing2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Testing2.png&amp;diff=131138"/>
		<updated>2019-12-07T14:49:57Z</updated>

		<summary type="html">&lt;p&gt;Srachak: Testing2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Testing2&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131137</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=131137"/>
		<updated>2019-12-07T14:49:09Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
Proposed Solution:&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
*'''Solution B''': Self-review at team level as an instance of SelfReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. &lt;br /&gt;
We can make use of the existing self review code and extend it to teammate reviews as well. &lt;br /&gt;
&lt;br /&gt;
In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”&lt;br /&gt;
&lt;br /&gt;
We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your work&lt;br /&gt;
#Click on self review button at the bottom of the page&lt;br /&gt;
#You will see a new “self teammate review” link here&lt;br /&gt;
#Clicking on the button will render the questionnaire &lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Files Modified in the Project==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:Database.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. The capybara test creates a new questionnaire by logging into expertiza as instructor6, and adds the cake type questions to the questionnaire. &lt;br /&gt;
[[File:Testing1.png|center]]&lt;br /&gt;
&lt;br /&gt;
Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric. &lt;br /&gt;
&lt;br /&gt;
The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. &lt;br /&gt;
To run and verify Rspec results, please do run the following commands from the expertiza folder: &lt;br /&gt;
&lt;br /&gt;
rspec spec/models/cake_spec.rb&lt;br /&gt;
rspec spec/features/cake_questionnaire.rb &lt;br /&gt;
&lt;br /&gt;
With the right gems installed, the test cases should ideally pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Testing1.png&amp;diff=131136</id>
		<title>File:Testing1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Testing1.png&amp;diff=131136"/>
		<updated>2019-12-07T14:47:13Z</updated>

		<summary type="html">&lt;p&gt;Srachak: uploaded a new version of &amp;amp;quot;File:Testing1.png&amp;amp;quot;: Testing code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;testcase code1&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Testing1.png&amp;diff=131135</id>
		<title>File:Testing1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Testing1.png&amp;diff=131135"/>
		<updated>2019-12-07T14:41:21Z</updated>

		<summary type="html">&lt;p&gt;Srachak: uploaded a new version of &amp;amp;quot;File:Testing1.png&amp;amp;quot;: Testing code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;testcase code1&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Testing1.png&amp;diff=131134</id>
		<title>File:Testing1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Testing1.png&amp;diff=131134"/>
		<updated>2019-12-07T14:39:01Z</updated>

		<summary type="html">&lt;p&gt;Srachak: testcase code1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;testcase code1&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=130820</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=130820"/>
		<updated>2019-12-07T03:18:09Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
Proposed Solution:&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
*'''Solution B''': Self-review at team level as an instance of SelfReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. &lt;br /&gt;
We can make use of the existing self review code and extend it to teammate reviews as well. &lt;br /&gt;
&lt;br /&gt;
In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”&lt;br /&gt;
&lt;br /&gt;
We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your work&lt;br /&gt;
#Click on self review button at the bottom of the page&lt;br /&gt;
#You will see a new “self teammate review” link here&lt;br /&gt;
#Clicking on the button will render the questionnaire &lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Files Modified in the Project==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:ER2.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. &lt;br /&gt;
&lt;br /&gt;
The capybara test creates a new questionnaire by logging into expertiza as instructor6, and adds the cake type questions to the questionnaire. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric. &lt;br /&gt;
&lt;br /&gt;
The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. &lt;br /&gt;
To run and verify Rspec results, please do run the following commands from the expertiza folder: &lt;br /&gt;
&lt;br /&gt;
rspec spec/models/cake_spec.rb&lt;br /&gt;
rspec spec/features/cake_questionnaire.rb &lt;br /&gt;
&lt;br /&gt;
With the right gems installed, the test cases should ideally pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=130819</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=130819"/>
		<updated>2019-12-07T03:15:35Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
Proposed Solution:&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
*'''Solution B''': Self-review at team level as an instance of SelfReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. &lt;br /&gt;
We can make use of the existing self review code and extend it to teammate reviews as well. &lt;br /&gt;
&lt;br /&gt;
In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”&lt;br /&gt;
&lt;br /&gt;
We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your work&lt;br /&gt;
#Click on self review button at the bottom of the page&lt;br /&gt;
#You will see a new “self teammate review” link here&lt;br /&gt;
#Clicking on the button will render the questionnaire &lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Files Modified in the Project==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Database Modification==&lt;br /&gt;
In order to implement the self review feature for teammate reviews we have added a column &amp;quot;is_self_teammate_review_enabled&amp;quot; to the assignments table. Below is the migration for the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; class SelfTeammateReview &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default =&amp;gt; false&lt;br /&gt;
  end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:ER2.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
*We will be adding unit / integration tests to all the files we modify.&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=130396</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=130396"/>
		<updated>2019-12-06T23:11:35Z</updated>

		<summary type="html">&lt;p&gt;Srachak: /* Proposed Code Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
Proposed Solution:&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
*'''Solution B''': Self-review at team level as an instance of SelfReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. &lt;br /&gt;
We can make use of the existing self review code and extend it to teammate reviews as well. &lt;br /&gt;
&lt;br /&gt;
In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”&lt;br /&gt;
&lt;br /&gt;
We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your work&lt;br /&gt;
#Click on self review button at the bottom of the page&lt;br /&gt;
#You will see a new “self teammate review” link here&lt;br /&gt;
#Clicking on the button will render the questionnaire &lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Files Modified in the Project==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:ER2.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
*We will be adding unit / integration tests to all the files we modify.&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=130258</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=130258"/>
		<updated>2019-12-06T21:52:03Z</updated>

		<summary type="html">&lt;p&gt;Srachak: /* Problem Definition: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
Proposed Solution:&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
*'''Solution B''': Self-review at team level as an instance of SelfReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. &lt;br /&gt;
We can make use of the existing self review code and extend it to teammate reviews as well. &lt;br /&gt;
&lt;br /&gt;
In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”&lt;br /&gt;
&lt;br /&gt;
We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your work&lt;br /&gt;
#Click on self review button at the bottom of the page&lt;br /&gt;
#You will see a new “self teammate review” link here&lt;br /&gt;
#Clicking on the button will render the questionnaire &lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Proposed Code Changes==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:ER2.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
*We will be adding unit / integration tests to all the files we modify.&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=130222</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=130222"/>
		<updated>2019-12-06T21:28:21Z</updated>

		<summary type="html">&lt;p&gt;Srachak: /* Introduction: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  One “problem” with all of these types is that there is nothing to stop a reviewer from assigning the maximum score to all reviewees.  This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
Proposed Solution:&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
*'''Solution B''': Self-review at team level as an instance of SelfReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. &lt;br /&gt;
We can make use of the existing self review code and extend it to teammate reviews as well. &lt;br /&gt;
&lt;br /&gt;
In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”&lt;br /&gt;
&lt;br /&gt;
We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your work&lt;br /&gt;
#Click on self review button at the bottom of the page&lt;br /&gt;
#You will see a new “self teammate review” link here&lt;br /&gt;
#Clicking on the button will render the questionnaire &lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Proposed Code Changes==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:ER2.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
*We will be adding unit / integration tests to all the files we modify.&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=130220</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=130220"/>
		<updated>2019-12-06T21:25:46Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  One “problem” with all of these types is that there is nothing to stop a reviewer from assigning the maximum score to all reviewees.  This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
Proposed Solution:&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
*'''Solution B''': Self-review at team level as an instance of SelfReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. &lt;br /&gt;
We can make use of the existing self review code and extend it to teammate reviews as well. &lt;br /&gt;
&lt;br /&gt;
In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”&lt;br /&gt;
&lt;br /&gt;
We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your work&lt;br /&gt;
#Click on self review button at the bottom of the page&lt;br /&gt;
#You will see a new “self teammate review” link here&lt;br /&gt;
#Clicking on the button will render the questionnaire &lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Proposed Code Changes==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:ER2.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
*We will be adding unit / integration tests to all the files we modify.&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=129157</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=129157"/>
		<updated>2019-11-12T04:02:48Z</updated>

		<summary type="html">&lt;p&gt;Srachak: /* Test Plan: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. It consists of the functionality to add questionnaires to be answered by the students. One such type of questionnaire is the reviews. Here, the students review other students and their work and sometimes their own work. When students review their own teammates for their contribution to an assignment it is termed as a teammate review. The questionnaire has many questions and each question can be of a certain type. For example, one type is rating students out of 5 while another one could be just choosing true/false with a comment. However, as of now there exists no question type which lets the user allocate a certain quantity to each team member and the total quantity should not be greater than a given threshold. This kind of question type say &amp;quot;cake&amp;quot; can be used while comparing the contribution provided by each teammate in a project according to a student and to make sure that the total contribution provided is not greater than 100%.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  One “problem” with all of these types is that there is nothing to stop a reviewer from assigning the maximum score to all reviewees.  This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
Proposed Solution:&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
*'''Solution B''': Self-review at team level as an instance of SelfReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. &lt;br /&gt;
We can make use of the existing self review code and extend it to teammate reviews as well. &lt;br /&gt;
&lt;br /&gt;
In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”&lt;br /&gt;
&lt;br /&gt;
We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your work&lt;br /&gt;
#Click on self review button at the bottom of the page&lt;br /&gt;
#You will see a new “self teammate review” link here&lt;br /&gt;
#Clicking on the button will render the questionnaire &lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Proposed Code Changes==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:ER2.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
====Automated testing using Rspec==== &lt;br /&gt;
&lt;br /&gt;
*We will be adding unit / integration tests to all the files we modify.&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=129155</id>
		<title>CSC/ECE 517 Fall 2019</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=129155"/>
		<updated>2019-11-12T03:59:51Z</updated>

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

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

		<summary type="html">&lt;p&gt;Srachak: /* Introduction: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. It consists of the functionality to add questionnaires to be answered by the students. One such type of questionnaire is the reviews. Here, the students review other students and their work and sometimes their own work. When students review their own teammates for their contribution to an assignment it is termed as a teammate review. The questionnaire has many questions and each question can be of a certain type. For example, one type is rating students out of 5 while another one could be just choosing true/false with a comment. However, as of now there exists no question type which lets the user allocate a certain quantity to each team member and the total quantity should not be greater than a given threshold. This kind of question type say &amp;quot;cake&amp;quot; can be used while comparing the contribution provided by each teammate in a project according to a student and to make sure that the total contribution provided is not greater than 100%.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  One “problem” with all of these types is that there is nothing to stop a reviewer from assigning the maximum score to all reviewees.  This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
Proposed Solution:&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
*'''Solution B''': Self-review at team level as an instance of SelfReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. &lt;br /&gt;
We can make use of the existing self review code and extend it to teammate reviews as well. &lt;br /&gt;
&lt;br /&gt;
In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”&lt;br /&gt;
&lt;br /&gt;
We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your work&lt;br /&gt;
#Click on self review button at the bottom of the page&lt;br /&gt;
#You will see a new “self teammate review” link here&lt;br /&gt;
#Clicking on the button will render the questionnaire &lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Proposed Code Changes==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:ER2.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
Automated testing using Rspec: &lt;br /&gt;
*We will be adding unit / integration tests to all the files we modify.&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Oodd_copy.jpg&amp;diff=129110</id>
		<title>File:Oodd copy.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Oodd_copy.jpg&amp;diff=129110"/>
		<updated>2019-11-12T03:32:40Z</updated>

		<summary type="html">&lt;p&gt;Srachak: uploaded a new version of &amp;amp;quot;File:Oodd copy.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Oodd_copy.jpg&amp;diff=129100</id>
		<title>File:Oodd copy.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Oodd_copy.jpg&amp;diff=129100"/>
		<updated>2019-11-12T03:28:24Z</updated>

		<summary type="html">&lt;p&gt;Srachak: uploaded a new version of &amp;amp;quot;File:Oodd copy.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=129087</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=129087"/>
		<updated>2019-11-12T03:24:13Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. The manage content section of the application has different views which displays information about the users, courses, assignments, questionnaires, and reviews. The application should have a fully functional search functionality throughout the views, so that a user can search any type of data with ease, on the basis of any number of parameters depending on his requirements. Users should be searched on the basis of one more parameters which include name, full name, email, etc. Similarly, assignments should be searched on the basis of name, created date, updated date, etc. However, the search functionality in the existing application is constrained to just a single parameter for users and assignments. Questionnaires management does not have a search functionality implemented as yet. This project works on improving the search functionality of Expertiza, by adding search bars if not present, introducing advanced search feature where user can search on the basis of more than one parameters and making the search functionality appear more elegant.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  One “problem” with all of these types is that there is nothing to stop a reviewer from assigning the maximum score to all reviewees.  This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
Proposed Solution:&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Oodd_copy.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
*'''Solution B''': Self-review at team level as an instance of SelfReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. &lt;br /&gt;
We can make use of the existing self review code and extend it to teammate reviews as well. &lt;br /&gt;
&lt;br /&gt;
In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”&lt;br /&gt;
&lt;br /&gt;
We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your work&lt;br /&gt;
#Click on self review button at the bottom of the page&lt;br /&gt;
#You will see a new “self teammate review” link here&lt;br /&gt;
#Clicking on the button will render the questionnaire &lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Proposed Code Changes==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:ER2.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
Automated testing using Rspec: &lt;br /&gt;
*We will be adding unit / integration tests to all the files we modify.&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Oodd_copy.jpg&amp;diff=129084</id>
		<title>File:Oodd copy.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Oodd_copy.jpg&amp;diff=129084"/>
		<updated>2019-11-12T03:23:19Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=129082</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=129082"/>
		<updated>2019-11-12T03:22:01Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. The manage content section of the application has different views which displays information about the users, courses, assignments, questionnaires, and reviews. The application should have a fully functional search functionality throughout the views, so that a user can search any type of data with ease, on the basis of any number of parameters depending on his requirements. Users should be searched on the basis of one more parameters which include name, full name, email, etc. Similarly, assignments should be searched on the basis of name, created date, updated date, etc. However, the search functionality in the existing application is constrained to just a single parameter for users and assignments. Questionnaires management does not have a search functionality implemented as yet. This project works on improving the search functionality of Expertiza, by adding search bars if not present, introducing advanced search feature where user can search on the basis of more than one parameters and making the search functionality appear more elegant.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  One “problem” with all of these types is that there is nothing to stop a reviewer from assigning the maximum score to all reviewees.  This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
Proposed Solution:&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
*'''Solution B''': Self-review at team level as an instance of SelfReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. &lt;br /&gt;
We can make use of the existing self review code and extend it to teammate reviews as well. &lt;br /&gt;
&lt;br /&gt;
In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”&lt;br /&gt;
&lt;br /&gt;
We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your work&lt;br /&gt;
#Click on self review button at the bottom of the page&lt;br /&gt;
#You will see a new “self teammate review” link here&lt;br /&gt;
#Clicking on the button will render the questionnaire &lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Proposed Code Changes==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:ER2.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
Automated testing using Rspec: &lt;br /&gt;
*We will be adding unit / integration tests to all the files we modify.&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=129080</id>
		<title>CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1992._Add_cake_type_to_rubrics_design&amp;diff=129080"/>
		<updated>2019-11-12T03:20:39Z</updated>

		<summary type="html">&lt;p&gt;Srachak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. The manage content section of the application has different views which displays information about the users, courses, assignments, questionnaires, and reviews. The application should have a fully functional search functionality throughout the views, so that a user can search any type of data with ease, on the basis of any number of parameters depending on his requirements. Users should be searched on the basis of one more parameters which include name, full name, email, etc. Similarly, assignments should be searched on the basis of name, created date, updated date, etc. However, the search functionality in the existing application is constrained to just a single parameter for users and assignments. Questionnaires management does not have a search functionality implemented as yet. This project works on improving the search functionality of Expertiza, by adding search bars if not present, introducing advanced search feature where user can search on the basis of more than one parameters and making the search functionality appear more elegant.&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&lt;br /&gt;
&lt;br /&gt;
Expertiza rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale.  One “problem” with all of these types is that there is nothing to stop a reviewer from assigning the maximum score to all reviewees.  This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.&lt;br /&gt;
&lt;br /&gt;
#When the reviewer submits a score that would bring the total assigned for this item to &amp;gt; 100%, the system needs to warn. &lt;br /&gt;
#Allow a reviewer to give him/herself a score&lt;br /&gt;
# Proposed design needs to be compatible with existing self reviews code and teammates reviews&lt;br /&gt;
# Should be extensible to other kind of reviews apart from teammate reviews as well&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
Proposed Solution:&lt;br /&gt;
&lt;br /&gt;
The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake &amp;lt; scored question &amp;lt; choice question &amp;lt; question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code. &lt;br /&gt;
&lt;br /&gt;
Addressing self-reviews for Cake Type:&lt;br /&gt;
&lt;br /&gt;
The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.&lt;br /&gt;
&lt;br /&gt;
There are two ways to integrate the Cake type to the existing flow:&lt;br /&gt;
&lt;br /&gt;
*'''Solution A''': Self-review at team level as an instance of TeammateReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.&lt;br /&gt;
&lt;br /&gt;
Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.&lt;br /&gt;
&lt;br /&gt;
The Teammate Review page would be displayed as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your team&lt;br /&gt;
#You will see a list of your teammates, including self: Choose a member and click on ‘View’&lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
*'''Solution B''': Self-review at team level as an instance of SelfReviewResponseMap&lt;br /&gt;
&lt;br /&gt;
Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. &lt;br /&gt;
We can make use of the existing self review code and extend it to teammate reviews as well. &lt;br /&gt;
&lt;br /&gt;
In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”&lt;br /&gt;
&lt;br /&gt;
We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
#Log in to expertiza to view the home page&lt;br /&gt;
#Login as an Instructor, and then impersonate a student or login as a Student&lt;br /&gt;
#Go to Assignments -&amp;gt; Your work&lt;br /&gt;
#Click on self review button at the bottom of the page&lt;br /&gt;
#You will see a new “self teammate review” link here&lt;br /&gt;
#Clicking on the button will render the questionnaire &lt;br /&gt;
#You can see the question for asking the contribution as a cake type&lt;br /&gt;
#There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)&lt;br /&gt;
&lt;br /&gt;
Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:UseCaseExpertizaCake.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Proposed Code Changes==&lt;br /&gt;
&lt;br /&gt;
#Edit '''questionnaire/_questionnaire.html.erb''': Add Cake to the list question types&lt;br /&gt;
#Create '''cake.rb''' model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.&lt;br /&gt;
#Edit '''questionnaires_controller.rb''', under “add_new_questions” method, adding a cake type and handle the changes. &lt;br /&gt;
#Edit '''assignments/edit/_review_strategy.html.erb''' and add ‘Allow teammate self-review’ to the list of options.&lt;br /&gt;
#Edit '''student_teams/view.html.erb''' and add reviewer to list of displayed teammates and mark that item as self review in the view.&lt;br /&gt;
#Edit '''response/response.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
#Edit '''response/view.html.erb''' and add cake type questions to the displayed response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
Below is the simplified version of the ER diagram which displays the relationships between the entity sets. &lt;br /&gt;
&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:ER2.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
====Test Details:====&lt;br /&gt;
====UI Testing====&lt;br /&gt;
&lt;br /&gt;
*Reviewing teammates (happy case when contribution is &amp;lt; 100%)&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#Click on review link for a fellow team member&lt;br /&gt;
#Fill the responses for the given questions (which include cake type questions as well) &lt;br /&gt;
#Save the review&lt;br /&gt;
&lt;br /&gt;
*Giving &amp;gt; 100% for cake questions &lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates under team members&lt;br /&gt;
#While reviewing a teammate, a student gives 60% as contribution to teammate1 &lt;br /&gt;
#When he tries to give &amp;gt; 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%&lt;br /&gt;
&lt;br /&gt;
*Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor. &lt;br /&gt;
#Self reviews enabled&lt;br /&gt;
#A student logs on to expertiza and clicks on an assignment &lt;br /&gt;
#Then he clicks on your team link&lt;br /&gt;
#He should be able to see his teammates and himself (for self review) under team members&lt;br /&gt;
#Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well. &lt;br /&gt;
#If the contribution is exceeded, a warning should appear&lt;br /&gt;
&lt;br /&gt;
*Self review disabled&lt;br /&gt;
#The link for a reviewer to review himself as a team member should not show&lt;br /&gt;
#The cake type questions in the teammate review should include only contributions provided by the other team members&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning. &lt;br /&gt;
#Self review enabled in the middle of the assignment&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 (make sure it adds upto 100%)&lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#As a student, notice that a new review button is visible in the “your team” page. &lt;br /&gt;
#Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%&lt;br /&gt;
&lt;br /&gt;
*Context: If self review is disabled after the assignment has been created and a few students have already given reviews.&lt;br /&gt;
#Self review disabled in the middle of the assignment &lt;br /&gt;
#Enable self review as an instructor&lt;br /&gt;
#Add teammate review for teammate1&lt;br /&gt;
#Add teammate review for teammate2 &lt;br /&gt;
#Add self review (make sure it adds upto 100%)&lt;br /&gt;
#Disable self review as an instructor&lt;br /&gt;
#As a student, notice that the review button is NOT visible in the “your team” page&lt;br /&gt;
&lt;br /&gt;
'''Open question''': what should the expected behavior be? Should we decrease the self review contribution? But this would reduce the total contribution &amp;lt; the desired 100%&lt;br /&gt;
&lt;br /&gt;
Automated testing using Rspec: &lt;br /&gt;
*We will be adding unit / integration tests to all the files we modify.&lt;br /&gt;
&lt;br /&gt;
==Team ==&lt;br /&gt;
&lt;br /&gt;
'''Mentor''': Carmen Bentley (cnaiken@ncsu.edu)&lt;br /&gt;
*Mita Gavade (magavade@ncsu.edu)&lt;br /&gt;
*Srujana Rachakonda (srachak@ncsu.edu)&lt;br /&gt;
*Ram Chavali (rlchaval@ncsu.edu)&lt;br /&gt;
*Abhirav Kariya (akariya@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Srachak</name></author>
	</entry>
</feed>