<?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=Rnarasi2</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=Rnarasi2"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Rnarasi2"/>
	<updated>2026-08-21T22:11:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131275</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131275"/>
		<updated>2019-12-16T05:17:49Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
*To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
**1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
**2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
== ''' Flowchart '''==&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(3).png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output(number of suggestions in the review comments) which will then be displayed in an alert to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For all the review scores received by the students, the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Overview of code changes''' ==&lt;br /&gt;
Please refer to [https://github.com/expertiza/expertiza/pull/1614/files Code changes] for the exact changes.&lt;br /&gt;
&lt;br /&gt;
We have modified the following files (added methods/ added code to methods/ replace code in the methods):&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper.rb:&lt;br /&gt;
** display_volume_metric_chart(reviewer) - changes made to resize the bar graph for volume metric and removal of legend for every graph.&lt;br /&gt;
** avg_num_suggestions_per_round(assignment_id, round_id, type) - as the name suggests, the goal is to obtain the average number of suggestions provided by the class in each review round of the assignment.&lt;br /&gt;
** num_suggestions_per_student_per_round(response_maps, round_id) - the goal is to obtain the average number of suggestions provided by the student in each review round of the assignment.&lt;br /&gt;
** comments_in_current_response(response_id) - provides a concatenated text consisting of all review comments in the current response.&lt;br /&gt;
** retrieve_review_suggestion_metrics(comments) - this function has been added to be able to make calls to the API in the future, when it starts working. &lt;br /&gt;
** num_suggestions_for_responses_by_a_reviewer(comments) - this function should make a call to the function mentioned above. Currently, we use this function to simulate the number of suggestions in each comment, using a random number generator.&lt;br /&gt;
** num_suggestions_reviewer(responses) - this function provides the number of suggestion given by a reviewer to a student/team's work.&lt;br /&gt;
** display_suggestion_metric_chart(reviewer) - this method sets up the colors, labels and data to generate the bar graph for the suggestion metrics.&lt;br /&gt;
** initialize_suggestion_chart_elements(reviewer) - this method computes the number of suggestions provided by the student in each round, the average number of suggestions provided by the student in all rounds,  the average number of suggestions provided by the class in each round and the average number of suggestions provided by the class in all rounds. This data is generated as a collection of lists.&lt;br /&gt;
&lt;br /&gt;
*_review_report.html.erb: changes are made to restructure the legend and add labels corresponding to suggestion metrics.&lt;br /&gt;
&lt;br /&gt;
* response.html.erb: jQuery changes have been made to get the current response stored in the params and calculate average of the same instantly, when the student clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===='''Additions &amp;amp; Modifications'''====&lt;br /&gt;
Listed below are the major changes along with the screenshots of git diffs of those file/functions.&lt;br /&gt;
# Changes made to display the suggestions metrics bar chart to the instructor in review_mapping_helper.rb file.&lt;br /&gt;
  [[File:Display_suggestion_metric_chart_screenshot.png‎]]&lt;br /&gt;
&lt;br /&gt;
2. Changes made to initialize all the metrics and get all their values from the web service / random number generator when the instructor views the Review Report.&lt;br /&gt;
  [[File:Initialize_suggestion_chart_elements_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
3. Changes made to call the web service (currently commented out since the service is not up) / random number generator. We call the function to get number of suggestions for the reviewer per round per team and for the class as a whole to calculate the average. Below is the git diff:&lt;br /&gt;
  [[File:Num_suggestions_reviewer_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
4. Changes made to the response.html.erb where these functions are actually called from. &lt;br /&gt;
  [[File:Response_html_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Automated Tests''' ==&lt;br /&gt;
* review_assignment_spec.rb: Tests have been added to test the feature of identifying the number of suggestions in a given review.&lt;br /&gt;
** Check whether the student is able to see a suggestion score for his/her review - on clicking save&lt;br /&gt;
** Check whether the student is able to see the average number of suggestions given by the class - on clicking save&lt;br /&gt;
** Check whether the student is able to see a suggestion score for his/her review - on clicking submit&lt;br /&gt;
** Check whether the student is able to see the average number of suggestions given by the class - on clicking submit&lt;br /&gt;
** Check whether the number of suggestions displayed is in the valid range of numbers - on clicking save and submit&lt;br /&gt;
** Check whether the the average number of suggestions given by the class is in the valid range of numbers - on clicking save and submit&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper_spec.rb : Test have been added to check whether the new legends for metric is now part of the &amp;quot;Review reports&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
== ''' Screenshots'''==&lt;br /&gt;
Review reports page as visible to the Instructor, after the above mentioned changes.&lt;br /&gt;
  [[File:Review reports.png]]&lt;br /&gt;
  &lt;br /&gt;
Suggestion metrics as visible to the reviewer when saving the review.&lt;br /&gt;
   [[File:SaveScreenshot.png]]&lt;br /&gt;
&lt;br /&gt;
Suggestion metrics as visible to the reviewer when submitting the review.&lt;br /&gt;
   [[File:SubmitScreenshot.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Steps to follow for UI testing ===&lt;br /&gt;
==== For student ====&lt;br /&gt;
    Steps I:&lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. An alert should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
&lt;br /&gt;
    Steps II:&lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. An alert should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
&lt;br /&gt;
==== For an instructor ====&lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===='''Testing'''====&lt;br /&gt;
Following test cases were added to see whether the functionality works as intended.&lt;br /&gt;
 &lt;br /&gt;
# Whether the alert renders the number of suggestions for a reviewee on save/submit.&lt;br /&gt;
# Whether the alert renders the average number of suggestions in a class for a reviewee on save/submit.&lt;br /&gt;
# Whether the function returns the number of suggestions in correct bounds and returns an Integer value.&lt;br /&gt;
# Whether the function returns the average number of suggestions in correct bounds and returns an Integer value.&lt;br /&gt;
[[File:Testing_few_screenshot.png]]&lt;br /&gt;
#. Whether the review report has the modified legend metrics.&lt;br /&gt;
[[File:Review_mapping_helper_spec_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;br /&gt;
# [https://www.youtube.com/watch?v=FfQVuUgyMYM Project Demo]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131274</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131274"/>
		<updated>2019-12-16T05:14:32Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
*To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
**1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
**2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
== ''' Flowchart '''==&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(3).png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output(number of suggestions in the review comments) which will then be displayed in an alert to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For all the review scores received by the students, the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Overview of code changes''' ==&lt;br /&gt;
Please refer to [https://github.com/expertiza/expertiza/pull/1614/files Code changes] for the exact changes.&lt;br /&gt;
&lt;br /&gt;
We have modified the following files (added methods/ added code to methods/ replace code in the methods):&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper.rb:&lt;br /&gt;
** display_volume_metric_chart(reviewer) - changes made to resize the bar graph for volume metric and removal of legend for every graph.&lt;br /&gt;
** avg_num_suggestions_per_round(assignment_id, round_id, type) - as the name suggests, the goal is to obtain the average number of suggestions provided by the class in each review round of the assignment.&lt;br /&gt;
** num_suggestions_per_student_per_round(response_maps, round_id) - the goal is to obtain the average number of suggestions provided by the student in each review round of the assignment.&lt;br /&gt;
** comments_in_current_response(response_id) - provides a concatenated text consisting of all review comments in the current response.&lt;br /&gt;
** retrieve_review_suggestion_metrics(comments) - this function has been added to be able to make calls to the API in the future, when it starts working. &lt;br /&gt;
** num_suggestions_for_responses_by_a_reviewer(comments) - this function should make a call to the function mentioned above. Currently, we use this function to simulate the number of suggestions in each comment, using a random number generator.&lt;br /&gt;
** num_suggestions_reviewer(responses) - this function provides the number of suggestion given by a reviewer to a student/team's work.&lt;br /&gt;
** display_suggestion_metric_chart(reviewer) - this method sets up the colors, labels and data to generate the bar graph for the suggestion metrics.&lt;br /&gt;
** initialize_suggestion_chart_elements(reviewer) - this method computes the number of suggestions provided by the student in each round, the average number of suggestions provided by the student in all rounds,  the average number of suggestions provided by the class in each round and the average number of suggestions provided by the class in all rounds. This data is generated as a collection of lists.&lt;br /&gt;
&lt;br /&gt;
*_review_report.html.erb: changes are made to restructure the legend and add labels corresponding to suggestion metrics.&lt;br /&gt;
&lt;br /&gt;
* response.html.erb: jQuery changes have been made to get the current response stored in the params and calculate average of the same instantly, when the student clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===='''Additions &amp;amp; Modifications'''====&lt;br /&gt;
Listed below are the major changes along with the screenshots of git diffs of those file/functions.&lt;br /&gt;
# Changes made to display the suggestions metrics bar chart to the instructor in review_mapping_helper.rb file.&lt;br /&gt;
  [[File:Display_suggestion_metric_chart_screenshot.png‎]]&lt;br /&gt;
&lt;br /&gt;
2. Changes made to initialize all the metrics and get all their values from the web service / random number generator when the instructor views the Review Report.&lt;br /&gt;
  [[File:Initialize_suggestion_chart_elements_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
3. Changes made to call the web service (currently commented out since the service is not up) / random number generator. We call the function to get number of suggestions for the reviewer per round per team and for the class as a whole to calculate the average. Below is the git diff:&lt;br /&gt;
  [[File:Num_suggestions_reviewer_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
4. Changes made to the response.html.erb where these functions are actually called from. &lt;br /&gt;
  [[File:Response_html_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Automated Tests''' ==&lt;br /&gt;
* review_assignment_spec.rb: Tests have been added to test the feature of identifying the number of suggestions in a given review.&lt;br /&gt;
** Check whether the student is able to see a suggestion score for his/her review - on clicking save&lt;br /&gt;
** Check whether the student is able to see the average number of suggestions given by the class - on clicking save&lt;br /&gt;
** Check whether the student is able to see a suggestion score for his/her review - on clicking submit&lt;br /&gt;
** Check whether the student is able to see the average number of suggestions given by the class - on clicking submit&lt;br /&gt;
** Check whether the number of suggestions displayed is in the valid range of numbers - on clicking save and submit&lt;br /&gt;
** Check whether the the average number of suggestions given by the class is in the valid range of numbers - on clicking save and submit&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper_spec.rb : Test have been added to check whether the new legends for metric is now part of the &amp;quot;Review reports&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
== ''' Screenshots'''==&lt;br /&gt;
Review reports page as visible to the Instructor, after the above mentioned changes.&lt;br /&gt;
  [[File:Review reports.png]]&lt;br /&gt;
  &lt;br /&gt;
Suggestion metrics as visible to the reviewer when saving the review.&lt;br /&gt;
   [[File:SaveScreenshot.png]]&lt;br /&gt;
&lt;br /&gt;
Suggestion metrics as visible to the reviewer when submitting the review.&lt;br /&gt;
   [[File:SubmitScreenshot.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Steps to follow for UI testing ===&lt;br /&gt;
==== For student ====&lt;br /&gt;
    Steps I:&lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. An alert should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
&lt;br /&gt;
    Steps II:&lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. An alert should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
&lt;br /&gt;
==== For an instructor ====&lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===='''Testing'''====&lt;br /&gt;
Following test cases were added to see whether the functionality works as intended.&lt;br /&gt;
 &lt;br /&gt;
# Whether the alert renders the number of suggestions for a reviewee on save/submit.&lt;br /&gt;
# Whether the alert renders the average number of suggestions in a class for a reviewee on save/submit.&lt;br /&gt;
# Whether the function returns the number of suggestions in correct bounds and returns an Integer value.&lt;br /&gt;
# Whether the function returns the average number of suggestions in correct bounds and returns an Integer value.&lt;br /&gt;
[[File:Testing_few_screenshot.png]]&lt;br /&gt;
#. Whether the review report has the modified legend metrics.&lt;br /&gt;
[[File:Review_mapping_helper_spec_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;br /&gt;
# [https://www.youtube.com/watch?v=FfQVuUgyMYM]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131076</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131076"/>
		<updated>2019-12-07T05:26:07Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
*To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
**1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
**2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
== ''' Flowchart '''==&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(3).png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output(number of suggestions in the review comments) which will then be displayed in an alert to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For all the review scores received by the students, the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Overview of code changes''' ==&lt;br /&gt;
Please refer to [https://github.com/expertiza/expertiza/pull/1614/files Code changes] for the exact changes.&lt;br /&gt;
&lt;br /&gt;
We have modified the following files (added methods/ added code to methods/ replace code in the methods):&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper.rb:&lt;br /&gt;
** display_volume_metric_chart(reviewer) - changes made to resize the bar graph for volume metric and removal of legend for every graph.&lt;br /&gt;
** avg_num_suggestions_per_round(assignment_id, round_id, type) - as the name suggests, the goal is to obtain the average number of suggestions provided by the class in each review round of the assignment.&lt;br /&gt;
** num_suggestions_per_student_per_round(response_maps, round_id) - the goal is to obtain the average number of suggestions provided by the student in each review round of the assignment.&lt;br /&gt;
** comments_in_current_response(response_id) - provides a concatenated text consisting of all review comments in the current response.&lt;br /&gt;
** retrieve_review_suggestion_metrics(comments) - this function has been added to be able to make calls to the API in the future, when it starts working. &lt;br /&gt;
** num_suggestions_for_responses_by_a_reviewer(comments) - this function should make a call to the function mentioned above. Currently, we use this function to simulate the number of suggestions in each comment, using a random number generator.&lt;br /&gt;
** num_suggestions_reviewer(responses) - this function provides the number of suggestion given by a reviewer to a student/team's work.&lt;br /&gt;
** display_suggestion_metric_chart(reviewer) - this method sets up the colors, labels and data to generate the bar graph for the suggestion metrics.&lt;br /&gt;
** initialize_suggestion_chart_elements(reviewer) - this method computes the number of suggestions provided by the student in each round, the average number of suggestions provided by the student in all rounds,  the average number of suggestions provided by the class in each round and the average number of suggestions provided by the class in all rounds. This data is generated as a collection of lists.&lt;br /&gt;
&lt;br /&gt;
*_review_report.html.erb: changes are made to restructure the legend and add labels corresponding to suggestion metrics.&lt;br /&gt;
&lt;br /&gt;
* response.html.erb: jQuery changes have been made to get the current response stored in the params and calculate average of the same instantly, when the student clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== '''Automated Tests''' ==&lt;br /&gt;
* review_assignment_spec.rb: Tests have been added to test the feature of identifying the number of suggestions in a given review.&lt;br /&gt;
** Check whether the student is able to see a suggestion score for his/her review - on clicking save&lt;br /&gt;
** Check whether the student is able to see the average number of suggestions given by the class - on clicking save&lt;br /&gt;
** Check whether the student is able to see a suggestion score for his/her review - on clicking submit&lt;br /&gt;
** Check whether the student is able to see the average number of suggestions given by the class - on clicking submit&lt;br /&gt;
** Check whether the number of suggestions displayed is in the valid range of numbers - on clicking save and submit&lt;br /&gt;
** Check whether the the average number of suggestions given by the class is in the valid range of numbers - on clicking save and submit&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper_spec.rb : Test have been added to check whether the new legends for metric is now part of the &amp;quot;Review reports&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
== ''' Screenshots'''==&lt;br /&gt;
Review reports page as visible to the Instructor, after the above mentioned changes.&lt;br /&gt;
  [[File:Review reports.png]]&lt;br /&gt;
  &lt;br /&gt;
Suggestion metrics as visible to the reviewer.&lt;br /&gt;
   [[File:Suggestions Display.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Steps to follow for UI testing ===&lt;br /&gt;
==== For student ====&lt;br /&gt;
    Steps I:&lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. An alert should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
&lt;br /&gt;
    Steps II:&lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. An alert should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
&lt;br /&gt;
==== For an instructor ====&lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131075</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131075"/>
		<updated>2019-12-07T05:25:53Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
*To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
**1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
**2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
== ''' Flowchart '''==&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(3).png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output(number of suggestions in the review comments) which will then be displayed in an alert to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For all the review scores received by the students, the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Overview of code changes''' ==&lt;br /&gt;
Please refer to [https://github.com/expertiza/expertiza/pull/1614/files Code changes] for the exact changes.&lt;br /&gt;
&lt;br /&gt;
We have modified the following files (added methods/ added code to methods/ replace code in the methods):&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper.rb:&lt;br /&gt;
** display_volume_metric_chart(reviewer) - changes made to resize the bar graph for volume metric and removal of legend for every graph.&lt;br /&gt;
** avg_num_suggestions_per_round(assignment_id, round_id, type) - as the name suggests, the goal is to obtain the average number of suggestions provided by the class in each review round of the assignment.&lt;br /&gt;
** num_suggestions_per_student_per_round(response_maps, round_id) - the goal is to obtain the average number of suggestions provided by the student in each review round of the assignment.&lt;br /&gt;
** comments_in_current_response(response_id) - provides a concatenated text consisting of all review comments in the current response.&lt;br /&gt;
** retrieve_review_suggestion_metrics(comments) - this function has been added to be able to make calls to the API in the future, when it starts working. &lt;br /&gt;
** num_suggestions_for_responses_by_a_reviewer(comments) - this function should make a call to the function mentioned above. Currently, we use this function to simulate the number of suggestions in each comment, using a random number generator.&lt;br /&gt;
** num_suggestions_reviewer(responses) - this function provides the number of suggestion given by a reviewer to a student/team's work.&lt;br /&gt;
** display_suggestion_metric_chart(reviewer) - this method sets up the colors, labels and data to generate the bar graph for the suggestion metrics.&lt;br /&gt;
** initialize_suggestion_chart_elements(reviewer) - this method computes the number of suggestions provided by the student in each round, the average number of suggestions provided by the student in all rounds,  the average number of suggestions provided by the class in each round and the average number of suggestions provided by the class in all rounds. This data is generated as a collection of lists.&lt;br /&gt;
&lt;br /&gt;
*_review_report.html.erb: changes are made to restructure the legend and add labels corresponding to suggestion metrics.&lt;br /&gt;
&lt;br /&gt;
* response.html.erb: jQuery changes have been made to get the current response stored in the params and calculate average of the same instantly, when the student clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== '''Automated Tests''' ==&lt;br /&gt;
* review_assignment_spec.rb: Tests have been added to test the feature of identifying the number of suggestions in a given review.&lt;br /&gt;
** Check whether the student is able to see a suggestion score for his/her review - on clicking save&lt;br /&gt;
** Check whether the student is able to see the average number of suggestions given by the class - on clicking save&lt;br /&gt;
** Check whether the student is able to see a suggestion score for his/her review - on clicking submit&lt;br /&gt;
** Check whether the student is able to see the average number of suggestions given by the class - on clicking submit&lt;br /&gt;
** Check whether the number of suggestions displayed is in the valid range of numbers - on clicking save and submit&lt;br /&gt;
** Check whether the the average number of suggestions given by the class is in the valid range of numbers - on clicking save and submit&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper_spec.rb : Test have been added to check whether the new legends for metric is now part of the &amp;quot;Review reports&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
== ''' Screenshots'''==&lt;br /&gt;
Review reports page as visible to the Instructor, after the above mentioned changes.&lt;br /&gt;
  [[File:Review reports.png]]&lt;br /&gt;
  &lt;br /&gt;
Suggestion metrics as visible to the reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Steps to follow for UI testing ===&lt;br /&gt;
==== For student ====&lt;br /&gt;
    Steps I:&lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. An alert should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
&lt;br /&gt;
    Steps II:&lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. An alert should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
&lt;br /&gt;
==== For an instructor ====&lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=131074</id>
		<title>File:Suggestions Display.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=131074"/>
		<updated>2019-12-07T05:25:22Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: uploaded a new version of &amp;amp;quot;File:Suggestions Display.png&amp;amp;quot;: Reverted to version as of 05:22, 7 December 2019&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=131073</id>
		<title>File:Suggestions Display.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=131073"/>
		<updated>2019-12-07T05:24:03Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: uploaded a new version of &amp;amp;quot;File:Suggestions Display.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=131071</id>
		<title>File:Suggestions Display.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=131071"/>
		<updated>2019-12-07T05:22:09Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: uploaded a new version of &amp;amp;quot;File:Suggestions Display.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131067</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131067"/>
		<updated>2019-12-07T05:20:14Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
*To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
**1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
**2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
== ''' Flowchart '''==&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(3).png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output(number of suggestions in the review comments) which will then be displayed in an alert to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For all the review scores received by the students, the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Overview of code changes''' ==&lt;br /&gt;
Please refer to [https://github.com/expertiza/expertiza/pull/1614/files Code changes] for the exact changes.&lt;br /&gt;
&lt;br /&gt;
We have modified the following files (added methods/ added code to methods/ replace code in the methods):&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper.rb:&lt;br /&gt;
** display_volume_metric_chart(reviewer) - changes made to resize the bar graph for volume metric and removal of legend for every graph.&lt;br /&gt;
** avg_num_suggestions_per_round(assignment_id, round_id, type) - as the name suggests, the goal is to obtain the average number of suggestions provided by the class in each review round of the assignment.&lt;br /&gt;
** num_suggestions_per_student_per_round(response_maps, round_id) - the goal is to obtain the average number of suggestions provided by the student in each review round of the assignment.&lt;br /&gt;
** comments_in_current_response(response_id) - provides a concatenated text consisting of all review comments in the current response.&lt;br /&gt;
** retrieve_review_suggestion_metrics(comments) - this function has been added to be able to make calls to the API in the future, when it starts working. &lt;br /&gt;
** num_suggestions_for_responses_by_a_reviewer(comments) - this function should make a call to the function mentioned above. Currently, we use this function to simulate the number of suggestions in each comment, using a random number generator.&lt;br /&gt;
** num_suggestions_reviewer(responses) - this function provides the number of suggestion given by a reviewer to a student/team's work.&lt;br /&gt;
** display_suggestion_metric_chart(reviewer) - this method sets up the colors, labels and data to generate the bar graph for the suggestion metrics.&lt;br /&gt;
** initialize_suggestion_chart_elements(reviewer) - this method computes the number of suggestions provided by the student in each round, the average number of suggestions provided by the student in all rounds,  the average number of suggestions provided by the class in each round and the average number of suggestions provided by the class in all rounds. This data is generated as a collection of lists.&lt;br /&gt;
&lt;br /&gt;
*_review_report.html.erb: changes are made to restructure the legend and add labels corresponding to suggestion metrics.&lt;br /&gt;
&lt;br /&gt;
* response.html.erb: jQuery changes have been made to get the current response stored in the params and calculate average of the same instantly, when the student clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== '''Automated Tests''' ==&lt;br /&gt;
* review_assignment_spec.rb: Tests have been added to test the feature of identifying the number of suggestions in a given review.&lt;br /&gt;
** Check whether the student is able to see a suggestion score for his/her review - on clicking save&lt;br /&gt;
** Check whether the student is able to see the average number of suggestions given by the class - on clicking save&lt;br /&gt;
** Check whether the student is able to see a suggestion score for his/her review - on clicking submit&lt;br /&gt;
** Check whether the student is able to see the average number of suggestions given by the class - on clicking submit&lt;br /&gt;
** Check whether the number of suggestions displayed is in the valid range of numbers - on clicking save and submit&lt;br /&gt;
** Check whether the the average number of suggestions given by the class is in the valid range of numbers - on clicking save and submit&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper_spec.rb : Test have been added to check whether the new legends for metric is now part of the &amp;quot;Review reports&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
== ''' Screenshots'''==&lt;br /&gt;
Review reports page as visible to the Instructor, after the above mentioned changes.&lt;br /&gt;
  [[File:Review reports.png]]&lt;br /&gt;
  &lt;br /&gt;
Suggestion metrics as visible to the reviewer.&lt;br /&gt;
 [[File:Suggestions Display.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Steps to follow for UI testing ===&lt;br /&gt;
==== For student ====&lt;br /&gt;
    Steps I:&lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. An alert should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
&lt;br /&gt;
    Steps II:&lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. An alert should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
&lt;br /&gt;
==== For an instructor ====&lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131066</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131066"/>
		<updated>2019-12-07T05:17:15Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
*To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
**1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
**2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
== ''' Flowchart '''==&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(3).png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output(number of suggestions in the review comments) which will then be displayed in an alert to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For all the review scores received by the students, the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Overview of code changes''' ==&lt;br /&gt;
Please refer to [https://github.com/expertiza/expertiza/pull/1614/files Code changes] for the exact changes.&lt;br /&gt;
&lt;br /&gt;
We have modified the following files (added methods/ added code to methods/ replace code in the methods):&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper.rb:&lt;br /&gt;
** display_volume_metric_chart(reviewer) - changes made to resize the bar graph for volume metric and removal of legend for every graph.&lt;br /&gt;
** avg_num_suggestions_per_round(assignment_id, round_id, type) - as the name suggests, the goal is to obtain the average number of suggestions provided by the class in each review round of the assignment.&lt;br /&gt;
** num_suggestions_per_student_per_round(response_maps, round_id) - the goal is to obtain the average number of suggestions provided by the student in each review round of the assignment.&lt;br /&gt;
** comments_in_current_response(response_id) - provides a concatenated text consisting of all review comments in the current response.&lt;br /&gt;
** retrieve_review_suggestion_metrics(comments) - this function has been added to be able to make calls to the API in the future, when it starts working. &lt;br /&gt;
** num_suggestions_for_responses_by_a_reviewer(comments) - this function should make a call to the function mentioned above. Currently, we use this function to simulate the number of suggestions in each comment, using a random number generator.&lt;br /&gt;
** num_suggestions_reviewer(responses) - this function provides the number of suggestion given by a reviewer to a student/team's work.&lt;br /&gt;
** display_suggestion_metric_chart(reviewer) - this method sets up the colors, labels and data to generate the bar graph for the suggestion metrics.&lt;br /&gt;
** initialize_suggestion_chart_elements(reviewer) - this method computes the number of suggestions provided by the student in each round, the average number of suggestions provided by the student in all rounds,  the average number of suggestions provided by the class in each round and the average number of suggestions provided by the class in all rounds. This data is generated as a collection of lists.&lt;br /&gt;
&lt;br /&gt;
*_review_report.html.erb: changes are made to restructure the legend and add labels corresponding to suggestion metrics.&lt;br /&gt;
&lt;br /&gt;
* response.html.erb: jQuery changes have been made to get the current response stored in the params and calculate average of the same instantly, when the student clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* review_assignment_spec.rb: Tests have been added to test the feature of identifying the number of suggestions in a given review.&lt;br /&gt;
** Check whether the student is able to see a suggestion score for his/her review - on clicking save&lt;br /&gt;
** Check whether the student is able to see the average number of suggestions given by the class - on clicking save&lt;br /&gt;
** Check whether the student is able to see a suggestion score for his/her review - on clicking submit&lt;br /&gt;
** Check whether the student is able to see the average number of suggestions given by the class - on clicking submit&lt;br /&gt;
** Check whether the number of suggestions displayed is in the valid range of numbers - on clicking save and submit&lt;br /&gt;
** Check whether the the average number of suggestions given by the class is in the valid range of numbers - on clicking save and submit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Screenshots'''==&lt;br /&gt;
Review reports page as visible to the Instructor, after the above mentioned changes.&lt;br /&gt;
  [[File:Review reports.png]]&lt;br /&gt;
  &lt;br /&gt;
Suggestion metrics as visible to the reviewer.&lt;br /&gt;
 [[File:Suggestions Display.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Steps to follow for UI testing ===&lt;br /&gt;
  ==== For student ====&lt;br /&gt;
    Steps I:&lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. An alert should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
&lt;br /&gt;
    Steps II:&lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. An alert should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
&lt;br /&gt;
==== For an instructor ====&lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=131061</id>
		<title>File:Suggestions Display.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=131061"/>
		<updated>2019-12-07T05:04:06Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: uploaded a new version of &amp;amp;quot;File:Suggestions Display.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131053</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=131053"/>
		<updated>2019-12-07T05:00:27Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
*To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
**1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
**2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
== ''' Flowchart '''==&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(3).png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output(number of suggestions in the review comments) which will then be displayed in an alert to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For all the review scores received by the students, the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Overview of code changes''' ==&lt;br /&gt;
Please refer to [https://github.com/expertiza/expertiza/pull/1614/files Code changes] for the exact changes.&lt;br /&gt;
&lt;br /&gt;
We have modified the following files (added methods/ added code to methods/ replace code in the methods):&lt;br /&gt;
* review_mapping_helper.rb:&lt;br /&gt;
** display_volume_metric_chart(reviewer) - changes made to resize the bar graph for volume metric and removal of legend for every graph.&lt;br /&gt;
** avg_num_suggestions_per_round(assignment_id, round_id, type) - as the name suggests, the goal is to obtain the average number of suggestions provided by the class in each review round of the assignment.&lt;br /&gt;
** num_suggestions_per_student_per_round(response_maps, round_id) - the goal is to obtain the average number of suggestions provided by the student in each review round of the assignment.&lt;br /&gt;
** comments_in_current_response(response_id) - provides a concatenated text consisting of all review comments in the current response.&lt;br /&gt;
** retrieve_review_suggestion_metrics(comments) - this function has been added to be able to make calls to the API in the future, when it starts working. &lt;br /&gt;
** num_suggestions_for_responses_by_a_reviewer(comments) - this function should make a call to the function mentioned above. Currently, we use this function to simulate the number of suggestions in each comment, using a random number generator.&lt;br /&gt;
** num_suggestions_reviewer(responses) - this function provides the number of suggestion given by a reviewer to a student/team's work.&lt;br /&gt;
** display_suggestion_metric_chart(reviewer) - this method sets up the colors, labels and data to generate the bar graph for the suggestion metrics.&lt;br /&gt;
** initialize_suggestion_chart_elements(reviewer) - this method computes the number of suggestions provided by the student in each round, the average number of suggestions provided by the student in all rounds,  the average number of suggestions provided by the class in each round and the average number of suggestions provided by the class in all rounds. This data is generated as a collection of lists.&lt;br /&gt;
&lt;br /&gt;
*_review_report.html.erb: changes are made to restructure the legend and add labels corresponding to suggestion metrics.&lt;br /&gt;
&lt;br /&gt;
* response.html.erb: jQuery changes have been made to get the current response stored in the params and calculate average of the same instantly, when the student clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* review_assignment_spec.rb: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Screenshots'''==&lt;br /&gt;
Review reports page as visible to the Instructor, after the above mentioned changes.&lt;br /&gt;
  [[File:Review reports.png]]&lt;br /&gt;
  &lt;br /&gt;
Suggestion metrics as visible to the reviewer.&lt;br /&gt;
 [[File:Suggestions Display.png]]&lt;br /&gt;
== ''' Anticipated Code Changes ''' ==&lt;br /&gt;
Broadly speaking, the following changes will be made:&lt;br /&gt;
* User: Student&lt;br /&gt;
  - Adding API calls of the suggestion-detection algorithm in the response_controller.rb&lt;br /&gt;
  - Adding an alert to display summarized analysis for all comments in the review&lt;br /&gt;
  - Write unit tests for our method(s) in review_mapping_helper.rb&lt;br /&gt;
  - Write unit tests for our changes in response.html.erb view&lt;br /&gt;
&lt;br /&gt;
* User: Instructor&lt;br /&gt;
  - Adding method call to display the aggregate analysis of student comments/reviews to reports_controller.rb under Metrics column&lt;br /&gt;
  - Write unit tests for our method(s) in reports_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
Below given scenarios is the basic overview of the tests planned on being written.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
We will test our project and added functionality using RSepc. Automated tests are carried out to test - &lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Save&amp;quot; review button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Save&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Save&amp;quot; button to save your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Submit Review&amp;quot; button to submit your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the instructor is able to see each student's aggregate review analysis score when he/she views Review Reports.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
There can also be other test cases to check for UI elements and control flow tests.&lt;br /&gt;
&lt;br /&gt;
Certain edge cases to look out for:&lt;br /&gt;
# Instructor should not be shown nil/error values when a student has not submitted any reviews.&lt;br /&gt;
# Student should not be shown the pop-up on clicking the &amp;quot;back&amp;quot; button or after refreshing the page.&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=130942</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=130942"/>
		<updated>2019-12-07T04:03:39Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
*To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
**1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
**2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
== ''' Flowchart '''==&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(3).png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output(number of suggestions in the review comments) which will then be displayed in an alert to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For all the review scores received by the students, the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Overview of code changes''' ==&lt;br /&gt;
Please refer to # [https://github.com/expertiza/expertiza/pull/1614/files Code changes] for the exact code changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Screenshots'''==&lt;br /&gt;
Review reports page as visible to the Instructor, after the above mentioned changes.&lt;br /&gt;
  [[File:Review reports.png]]&lt;br /&gt;
  &lt;br /&gt;
Suggestion metrics as visible to the reviewer.&lt;br /&gt;
 [[File:Suggestions Display.png]]&lt;br /&gt;
== ''' Anticipated Code Changes ''' ==&lt;br /&gt;
Broadly speaking, the following changes will be made:&lt;br /&gt;
* User: Student&lt;br /&gt;
  - Adding API calls of the suggestion-detection algorithm in the response_controller.rb&lt;br /&gt;
  - Adding an alert to display summarized analysis for all comments in the review&lt;br /&gt;
  - Write unit tests for our method(s) in review_mapping_helper.rb&lt;br /&gt;
  - Write unit tests for our changes in response.html.erb view&lt;br /&gt;
&lt;br /&gt;
* User: Instructor&lt;br /&gt;
  - Adding method call to display the aggregate analysis of student comments/reviews to reports_controller.rb under Metrics column&lt;br /&gt;
  - Write unit tests for our method(s) in reports_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
Below given scenarios is the basic overview of the tests planned on being written.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
We will test our project and added functionality using RSepc. Automated tests are carried out to test - &lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Save&amp;quot; review button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Save&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Save&amp;quot; button to save your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Submit Review&amp;quot; button to submit your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the instructor is able to see each student's aggregate review analysis score when he/she views Review Reports.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
There can also be other test cases to check for UI elements and control flow tests.&lt;br /&gt;
&lt;br /&gt;
Certain edge cases to look out for:&lt;br /&gt;
# Instructor should not be shown nil/error values when a student has not submitted any reviews.&lt;br /&gt;
# Student should not be shown the pop-up on clicking the &amp;quot;back&amp;quot; button or after refreshing the page.&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=130180</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=130180"/>
		<updated>2019-12-06T20:43:45Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
*To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
**1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
**2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
== ''' Flowchart '''==&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(3).png]]&lt;br /&gt;
&amp;lt;p&amp;gt; Legend:&lt;br /&gt;
 * Blue - Student/Reviewer&lt;br /&gt;
 * Purple - Instructor&lt;br /&gt;
 * Green - Interactions with the web service&lt;br /&gt;
 * &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As a student, once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output which will then be displayed in an alert to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For all the review scores received by the students, the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Code changes''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Screenshots'''==&lt;br /&gt;
Review reports page as visible to the Instructor, after the above mentioned changes.&lt;br /&gt;
  [[File:Review reports.png]]&lt;br /&gt;
  &lt;br /&gt;
Suggestion metrics as visible to the reviewer.&lt;br /&gt;
 [[File:Suggestions Display.png]]&lt;br /&gt;
== ''' Anticipated Code Changes ''' ==&lt;br /&gt;
Broadly speaking, the following changes will be made:&lt;br /&gt;
* User: Student&lt;br /&gt;
  - Adding API calls of the suggestion-detection algorithm in the response_controller.rb&lt;br /&gt;
  - Adding pop-up to display summarized analysis for all comments in the review&lt;br /&gt;
  - Ensure that CORS does not need to be enabled for API call to work&lt;br /&gt;
  - Write unit tests for our method(s) in response_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in response.html.erb view&lt;br /&gt;
&lt;br /&gt;
* User: Instructor&lt;br /&gt;
  - Adding method call to display the aggregate analysis of student comments/reviews to reports_controller.rb under Metrics column&lt;br /&gt;
  - Write unit tests for our method(s) in reports_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
Below given scenarios is the basic overview of the tests planned on being written.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
We will test our project and added functionality using RSepc. Automated tests are carried out to test - &lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Save&amp;quot; review button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Save&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Save&amp;quot; button to save your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Submit Review&amp;quot; button to submit your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the instructor is able to see each student's aggregate review analysis score when he/she views Review Reports.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
There can also be other test cases to check for UI elements and control flow tests.&lt;br /&gt;
&lt;br /&gt;
Certain edge cases to look out for:&lt;br /&gt;
# Instructor should not be shown nil/error values when a student has not submitted any reviews.&lt;br /&gt;
# Student should not be shown the pop-up on clicking the &amp;quot;back&amp;quot; button or after refreshing the page.&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=130175</id>
		<title>File:Suggestions Display.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=130175"/>
		<updated>2019-12-06T20:41:56Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: uploaded a new version of &amp;amp;quot;File:Suggestions Display.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=130138</id>
		<title>File:Suggestions Display.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=130138"/>
		<updated>2019-12-06T19:58:03Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: uploaded a new version of &amp;amp;quot;File:Suggestions Display.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=130137</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=130137"/>
		<updated>2019-12-06T19:57:05Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
*To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
**1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
**2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
== ''' Flowchart '''==&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(3).png]]&lt;br /&gt;
&amp;lt;p&amp;gt; Legend:&lt;br /&gt;
 * Blue - Student/Reviewer&lt;br /&gt;
 * Purple - Instructor&lt;br /&gt;
 * Green - Interactions with the web service&lt;br /&gt;
 * &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As a student, once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output which will then be displayed in an alert to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For all the review scores received by the students, the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Code changes''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Screenshots'''==&lt;br /&gt;
  [[File:Review reports.png]]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
 [[File:Suggestions Display.png]]&lt;br /&gt;
== ''' Anticipated Code Changes ''' ==&lt;br /&gt;
Broadly speaking, the following changes will be made:&lt;br /&gt;
* User: Student&lt;br /&gt;
  - Adding API calls of the suggestion-detection algorithm in the response_controller.rb&lt;br /&gt;
  - Adding pop-up to display summarized analysis for all comments in the review&lt;br /&gt;
  - Ensure that CORS does not need to be enabled for API call to work&lt;br /&gt;
  - Write unit tests for our method(s) in response_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in response.html.erb view&lt;br /&gt;
&lt;br /&gt;
* User: Instructor&lt;br /&gt;
  - Adding method call to display the aggregate analysis of student comments/reviews to reports_controller.rb under Metrics column&lt;br /&gt;
  - Write unit tests for our method(s) in reports_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
Below given scenarios is the basic overview of the tests planned on being written.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
We will test our project and added functionality using RSepc. Automated tests are carried out to test - &lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Save&amp;quot; review button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Save&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Save&amp;quot; button to save your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Submit Review&amp;quot; button to submit your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the instructor is able to see each student's aggregate review analysis score when he/she views Review Reports.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
There can also be other test cases to check for UI elements and control flow tests.&lt;br /&gt;
&lt;br /&gt;
Certain edge cases to look out for:&lt;br /&gt;
# Instructor should not be shown nil/error values when a student has not submitted any reviews.&lt;br /&gt;
# Student should not be shown the pop-up on clicking the &amp;quot;back&amp;quot; button or after refreshing the page.&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=130135</id>
		<title>File:Suggestions Display.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Suggestions_Display.png&amp;diff=130135"/>
		<updated>2019-12-06T19:55:56Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:CSC517_Final_Project_Flowchart(3).png&amp;diff=130130</id>
		<title>File:CSC517 Final Project Flowchart(3).png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:CSC517_Final_Project_Flowchart(3).png&amp;diff=130130"/>
		<updated>2019-12-06T19:44:01Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=130129</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=130129"/>
		<updated>2019-12-06T19:43:52Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
*To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
**1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
**2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
== ''' Flowchart '''==&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(3).png]]&lt;br /&gt;
&amp;lt;p&amp;gt; Legend:&lt;br /&gt;
 * Blue - Student/Reviewer&lt;br /&gt;
 * Purple - Instructor&lt;br /&gt;
 * Green - Interactions with the web service&lt;br /&gt;
 * &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As a student, once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output which will then be displayed in an alert to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For all the review scores received by the students, the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Code changes''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Screenshots'''==&lt;br /&gt;
  [[File:Review reports.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Anticipated Code Changes ''' ==&lt;br /&gt;
Broadly speaking, the following changes will be made:&lt;br /&gt;
* User: Student&lt;br /&gt;
  - Adding API calls of the suggestion-detection algorithm in the response_controller.rb&lt;br /&gt;
  - Adding pop-up to display summarized analysis for all comments in the review&lt;br /&gt;
  - Ensure that CORS does not need to be enabled for API call to work&lt;br /&gt;
  - Write unit tests for our method(s) in response_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in response.html.erb view&lt;br /&gt;
&lt;br /&gt;
* User: Instructor&lt;br /&gt;
  - Adding method call to display the aggregate analysis of student comments/reviews to reports_controller.rb under Metrics column&lt;br /&gt;
  - Write unit tests for our method(s) in reports_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
Below given scenarios is the basic overview of the tests planned on being written.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
We will test our project and added functionality using RSepc. Automated tests are carried out to test - &lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Save&amp;quot; review button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Save&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Save&amp;quot; button to save your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Submit Review&amp;quot; button to submit your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the instructor is able to see each student's aggregate review analysis score when he/she views Review Reports.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
There can also be other test cases to check for UI elements and control flow tests.&lt;br /&gt;
&lt;br /&gt;
Certain edge cases to look out for:&lt;br /&gt;
# Instructor should not be shown nil/error values when a student has not submitted any reviews.&lt;br /&gt;
# Student should not be shown the pop-up on clicking the &amp;quot;back&amp;quot; button or after refreshing the page.&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_reports.png&amp;diff=130121</id>
		<title>File:Review reports.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_reports.png&amp;diff=130121"/>
		<updated>2019-12-06T19:26:39Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: uploaded a new version of &amp;amp;quot;File:Review reports.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_reports.png&amp;diff=130120</id>
		<title>File:Review reports.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_reports.png&amp;diff=130120"/>
		<updated>2019-12-06T19:25:54Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: uploaded a new version of &amp;amp;quot;File:Review reports.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=130118</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=130118"/>
		<updated>2019-12-06T19:25:15Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
*To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
**1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
**2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
== ''' Flowchart '''==&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(2).png]]&lt;br /&gt;
&amp;lt;p&amp;gt;As a student, once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output which will then be displayed as a pop-up to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All the scores for all the reviews conducted by a student will be stored and the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Code changes''' ==&lt;br /&gt;
  [[File:Review reports.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Screenshots'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ''' Anticipated Code Changes ''' ==&lt;br /&gt;
Broadly speaking, the following changes will be made:&lt;br /&gt;
* User: Student&lt;br /&gt;
  - Adding API calls of the suggestion-detection algorithm in the response_controller.rb&lt;br /&gt;
  - Adding pop-up to display summarized analysis for all comments in the review&lt;br /&gt;
  - Ensure that CORS does not need to be enabled for API call to work&lt;br /&gt;
  - Write unit tests for our method(s) in response_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in response.html.erb view&lt;br /&gt;
&lt;br /&gt;
* User: Instructor&lt;br /&gt;
  - Adding method call to display the aggregate analysis of student comments/reviews to reports_controller.rb under Metrics column&lt;br /&gt;
  - Write unit tests for our method(s) in reports_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
Below given scenarios is the basic overview of the tests planned on being written.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
We will test our project and added functionality using RSepc. Automated tests are carried out to test - &lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Save&amp;quot; review button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Save&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Save&amp;quot; button to save your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Submit Review&amp;quot; button to submit your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the instructor is able to see each student's aggregate review analysis score when he/she views Review Reports.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
There can also be other test cases to check for UI elements and control flow tests.&lt;br /&gt;
&lt;br /&gt;
Certain edge cases to look out for:&lt;br /&gt;
# Instructor should not be shown nil/error values when a student has not submitted any reviews.&lt;br /&gt;
# Student should not be shown the pop-up on clicking the &amp;quot;back&amp;quot; button or after refreshing the page.&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_reports.png&amp;diff=130116</id>
		<title>File:Review reports.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_reports.png&amp;diff=130116"/>
		<updated>2019-12-06T19:24:50Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: uploaded a new version of &amp;amp;quot;File:Review reports.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_reports.png&amp;diff=130114</id>
		<title>File:Review reports.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_reports.png&amp;diff=130114"/>
		<updated>2019-12-06T19:23:37Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=129986</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=129986"/>
		<updated>2019-12-06T05:41:35Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
*To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
**1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
**2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
=== Flowchart ===&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(2).png]]&lt;br /&gt;
&amp;lt;p&amp;gt;As a student, once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output which will then be displayed as a pop-up to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All the scores for all the reviews conducted by a student will be stored and the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ''' Anticipated Code Changes ''' ==&lt;br /&gt;
Broadly speaking, the following changes will be made:&lt;br /&gt;
* User: Student&lt;br /&gt;
  - Adding API calls of the suggestion-detection algorithm in the response_controller.rb&lt;br /&gt;
  - Adding pop-up to display summarized analysis for all comments in the review&lt;br /&gt;
  - Ensure that CORS does not need to be enabled for API call to work&lt;br /&gt;
  - Write unit tests for our method(s) in response_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in response.html.erb view&lt;br /&gt;
&lt;br /&gt;
* User: Instructor&lt;br /&gt;
  - Adding method call to display the aggregate analysis of student comments/reviews to reports_controller.rb under Metrics column&lt;br /&gt;
  - Write unit tests for our method(s) in reports_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
Below given scenarios is the basic overview of the tests planned on being written.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
We will test our project and added functionality using RSepc. Automated tests are carried out to test - &lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Save&amp;quot; review button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Save&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Save&amp;quot; button to save your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Submit Review&amp;quot; button to submit your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the instructor is able to see each student's aggregate review analysis score when he/she views Review Reports.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
There can also be other test cases to check for UI elements and control flow tests.&lt;br /&gt;
&lt;br /&gt;
Certain edge cases to look out for:&lt;br /&gt;
# Instructor should not be shown nil/error values when a student has not submitted any reviews.&lt;br /&gt;
# Student should not be shown the pop-up on clicking the &amp;quot;back&amp;quot; button or after refreshing the page.&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=129985</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=129985"/>
		<updated>2019-12-06T05:40:55Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
* The suggestion detection algorithm was expected to identify the number of suggestions in the review comments given by a reviewer. To mock this number, we used a random number generator. Now we expect to receive a value between 0-10 as the number of suggestions provided by the student in one round of review. (Refer to method: num_suggestions_for_responses_by_a_reviewer in review_mapping_helper.rb)&lt;br /&gt;
* In order to be able to use integrate the suggestion detection algorithm in the future, we have included a function with the API calls to the service. This function and the corresponding call to this function is currently commented. (Refer to methods: num_suggestions_for_responses_by_a_reviewer and retrieve_review_suggestion_metrics in review_mapping_helper.rb.)&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
* We wish to present the reviewer(student) with an idea of how useful their reviews are, in comparison to that of the class. &lt;br /&gt;
To achieve this, we have included the following in an alert when the reviewer clicks on &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot;:&lt;br /&gt;
1. The number of suggestions in the review comments provided by the reviewer for that round &lt;br /&gt;
2. The average number of suggestions in the review comments provided by all reviewers of the class &lt;br /&gt;
(Again, for the purpose of demonstration, we have used values from the random number generator mentioned above.)&lt;br /&gt;
&lt;br /&gt;
=== Part 3 : Suggestion metrics depicted as bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
* We wish to present the instructor with comparison of the number of suggestions present in the review comments provided by a student and the average number of suggestions typically provided by the class. We have represented this data in the form of a bar graph showing the round-wise comparison for each assignment. This visualization adheres to the pattern of visualization which was present on this page for volume of review comments and average volume of review comments.&lt;br /&gt;
&lt;br /&gt;
=== Flowchart ===&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(2).png]]&lt;br /&gt;
&amp;lt;p&amp;gt;As a student, once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output which will then be displayed as a pop-up to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All the scores for all the reviews conducted by a student will be stored and the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ''' Anticipated Code Changes ''' ==&lt;br /&gt;
Broadly speaking, the following changes will be made:&lt;br /&gt;
* User: Student&lt;br /&gt;
  - Adding API calls of the suggestion-detection algorithm in the response_controller.rb&lt;br /&gt;
  - Adding pop-up to display summarized analysis for all comments in the review&lt;br /&gt;
  - Ensure that CORS does not need to be enabled for API call to work&lt;br /&gt;
  - Write unit tests for our method(s) in response_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in response.html.erb view&lt;br /&gt;
&lt;br /&gt;
* User: Instructor&lt;br /&gt;
  - Adding method call to display the aggregate analysis of student comments/reviews to reports_controller.rb under Metrics column&lt;br /&gt;
  - Write unit tests for our method(s) in reports_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
Below given scenarios is the basic overview of the tests planned on being written.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
We will test our project and added functionality using RSepc. Automated tests are carried out to test - &lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Save&amp;quot; review button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Save&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Save&amp;quot; button to save your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Submit Review&amp;quot; button to submit your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the instructor is able to see each student's aggregate review analysis score when he/she views Review Reports.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
There can also be other test cases to check for UI elements and control flow tests.&lt;br /&gt;
&lt;br /&gt;
Certain edge cases to look out for:&lt;br /&gt;
# Instructor should not be shown nil/error values when a student has not submitted any reviews.&lt;br /&gt;
# Student should not be shown the pop-up on clicking the &amp;quot;back&amp;quot; button or after refreshing the page.&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=129984</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=129984"/>
		<updated>2019-12-06T04:58:08Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determining how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
* To detect the number of suggestions in a text, there is a web service in place, developed previously by some contributors. We wish to integrate this suggestion detection algorithm and use its results to show the suggestion metrics to the reviewer as well as the instructor.&lt;br /&gt;
* '''Please note that unfortunately the web service mentioned above is currently not working. Thus we will use simulations to mock the response from the web service for this project. '''&lt;br /&gt;
&lt;br /&gt;
== '''Implementation Details'''==&lt;br /&gt;
&lt;br /&gt;
=== Part 1 : Mocking the response which is to be received from the suggestion detection web service===&lt;br /&gt;
&lt;br /&gt;
=== Part 2 : Suggestion metrics on saving / submitting review ===&lt;br /&gt;
&lt;br /&gt;
=== Part 3 :  Suggestion metrics bar graphs in &amp;quot;Review Reports&amp;quot; page ===&lt;br /&gt;
&lt;br /&gt;
=== Flowchart ===&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(2).png]]&lt;br /&gt;
&amp;lt;p&amp;gt;As a student, once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output which will then be displayed as a pop-up to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All the scores for all the reviews conducted by a student will be stored and the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ''' Anticipated Code Changes ''' ==&lt;br /&gt;
Broadly speaking, the following changes will be made:&lt;br /&gt;
* User: Student&lt;br /&gt;
  - Adding API calls of the suggestion-detection algorithm in the response_controller.rb&lt;br /&gt;
  - Adding pop-up to display summarized analysis for all comments in the review&lt;br /&gt;
  - Ensure that CORS does not need to be enabled for API call to work&lt;br /&gt;
  - Write unit tests for our method(s) in response_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in response.html.erb view&lt;br /&gt;
&lt;br /&gt;
* User: Instructor&lt;br /&gt;
  - Adding method call to display the aggregate analysis of student comments/reviews to reports_controller.rb under Metrics column&lt;br /&gt;
  - Write unit tests for our method(s) in reports_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
Below given scenarios is the basic overview of the tests planned on being written.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
We will test our project and added functionality using RSepc. Automated tests are carried out to test - &lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Save&amp;quot; review button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Save&amp;quot; button to save the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the APIs are being called when the student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login to student profile.&lt;br /&gt;
    2. Go to your open assignments and submit your work.&lt;br /&gt;
    3. Go to that particular assignment and request a review.&lt;br /&gt;
    4. Begin writing a review. &lt;br /&gt;
    5. Click &amp;quot;Submit Review&amp;quot; button to submit the review.&lt;br /&gt;
    6. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Save&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Save&amp;quot; button to save your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the pop-up displays review comments analysis when student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. (As a student) Click &amp;quot;Submit Review&amp;quot; button to submit your current review.&lt;br /&gt;
    2. A pop-up should be displayed that shows the review comment analysis for the student.&lt;br /&gt;
    3. Pop-up should display bar graph and comments on the student's review as compared to the average &lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
    4. Pop-up should display bar graph and comments on the student's review as compared to the total&lt;br /&gt;
       review comments for that assignment.&lt;br /&gt;
* Whether the instructor is able to see each student's aggregate review analysis score when he/she views Review Reports.&lt;br /&gt;
    Steps:&lt;br /&gt;
    &lt;br /&gt;
    1. Login as an instructor.&lt;br /&gt;
    2. Navigate to all assignments list.&lt;br /&gt;
    3. Click on View Reports button and open Review Report for that assignment.&lt;br /&gt;
    4. The instructor should be able to see each student's review comment analysis for the submitted reviews under the metric column.&lt;br /&gt;
&lt;br /&gt;
There can also be other test cases to check for UI elements and control flow tests.&lt;br /&gt;
&lt;br /&gt;
Certain edge cases to look out for:&lt;br /&gt;
# Instructor should not be shown nil/error values when a student has not submitted any reviews.&lt;br /&gt;
# Student should not be shown the pop-up on clicking the &amp;quot;back&amp;quot; button or after refreshing the page.&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1493 Pull request for a Metrics Legend change]&lt;br /&gt;
# [https://github.com/expertiza/expertiza Expertiza Github Repo]&lt;br /&gt;
# [https://github.com/expertiza/expertiza/pull/1614 Our project's Github pull request]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=129327</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=129327"/>
		<updated>2019-11-15T19:37:00Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
* It is observed that the students learn more by reviewing others' work than working on the project as it gives them perspective about alternative approaches to solve a problem.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are for the receiver. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments as a way of determinimg how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course. The reviews could be graded on this basis.&lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, reviewers can only submit reviews for their peers and their comments are not evaluated instantly.&lt;br /&gt;
* Instructor can view insights regarding the text comments entered by the reviewers in terms of the volume of the text. Instructors do not have other metrics with regards to the number of problems and suggestions identified by the reviewers.&lt;br /&gt;
&lt;br /&gt;
== ''' Proposed Solutions ''' ==&lt;br /&gt;
* On the student review page, once a student saves his/her review, a pop can show be shown with the feedback - suggestion scores, problem scores and tone analysis among others.&lt;br /&gt;
* As an instructor, one might be able to check each student's review scores and his performance as compared with the class. These scores along with the metrics will be shown in the review report page under the metrics column.&lt;br /&gt;
&lt;br /&gt;
=== Flowchart ===&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(2).png]]&lt;br /&gt;
&amp;lt;p&amp;gt;As a student, once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output which will then be displayed as a pop-up to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All the scores for all the reviews conducted by a student will be stored and the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ''' Anticipated Code Changes ''' ==&lt;br /&gt;
Broadly speaking, the following changes will be made:&lt;br /&gt;
* User: Student&lt;br /&gt;
  - Adding API calls of the suggestion-detection algorithm in the response_controller.rb&lt;br /&gt;
  - Adding pop-up to display summarized analysis for all comments in the review&lt;br /&gt;
  - Ensure that CORS does not need to be enabled for API call to work&lt;br /&gt;
  - Write unit tests for our method(s) in response_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in response.html.erb view&lt;br /&gt;
&lt;br /&gt;
* User: Instructor&lt;br /&gt;
  - Adding method call to display the aggregate analysis of student comments/reviews to reports_controller.rb under Metrics column&lt;br /&gt;
  - Write unit tests for our method(s) in reports_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
Below given scenarios is the basic overview of the tests planned on being written.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
We will test our project and added functionality using RSepc. Automated tests are carried out to test - &lt;br /&gt;
# Whether the APIs are being called when the student clicks &amp;quot;Save&amp;quot; review button.&lt;br /&gt;
# Whether the APIs are being called when the student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
# Whether the pop-up displays review comments analysis when student clicks &amp;quot;Save&amp;quot; button.&lt;br /&gt;
# Whether the pop-up displays review comments analysis when student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
# Whether the instructor is able to see each student's aggregate review analysis score when he/she views Review Reports.&lt;br /&gt;
&lt;br /&gt;
There can also be other test cases to check for UI elements and control flow tests.&lt;br /&gt;
&lt;br /&gt;
Certain edge cases to look out for:&lt;br /&gt;
# Instructor should not be shown nil/error values when a student has not submitted any reviews.&lt;br /&gt;
# Student should not be shown the pop-up on clicking the &amp;quot;back&amp;quot; button or after refreshing the page.&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=129326</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=129326"/>
		<updated>2019-11-15T19:20:44Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, reviewers cannot see insights on the how many problems and suggestions have been identified in their reviews. They can only submit reviews for their peers.&lt;br /&gt;
* Instructor can view insights regarding the text comments entered by the reviewers in terms of the volume of the text. Instructors do not have metrics with regards to the number of problems and suggestions identified by the reviewers.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments to determine how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course.&lt;br /&gt;
&lt;br /&gt;
== ''' Proposed Solutions ''' ==&lt;br /&gt;
* On the student review page, once a student saves his/her review, a pop can show be shown with the feedback - suggestion scores, problem scores and tone analysis among others.&lt;br /&gt;
* As an instructor, one might be able to check each student's review scores and his performance as compared with the class. These scores along with the metrics will be shown in the review report page under the metrics column.&lt;br /&gt;
&lt;br /&gt;
=== Flowchart ===&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart(2).png]]&lt;br /&gt;
&amp;lt;p&amp;gt;As a student, once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output which will then be displayed as a pop-up to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All the scores for all the reviews conducted by a student will be stored and the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ''' Anticipated Code Changes ''' ==&lt;br /&gt;
Broadly speaking, the following changes will be made:&lt;br /&gt;
* User: Student&lt;br /&gt;
  - Adding API calls of the suggestion-detection algorithm in the response_controller.rb&lt;br /&gt;
  - Adding pop-up to display summarized analysis for all comments in the review&lt;br /&gt;
  - Ensure that CORS does not need to be enabled for API call to work&lt;br /&gt;
  - Write unit tests for our method(s) in response_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in response.html.erb view&lt;br /&gt;
&lt;br /&gt;
* User: Instructor&lt;br /&gt;
  - Adding method call to display the aggregate analysis of student comments/reviews to reports_controller.rb under Metrics column&lt;br /&gt;
  - Write unit tests for our method(s) in reports_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
Below given scenarios is the basic overview of the tests planned on being written.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
We will test our project and added functionality using RSepc. Automated tests are carried out to test - &lt;br /&gt;
# Whether the APIs are being called when the student clicks &amp;quot;Save&amp;quot; review button.&lt;br /&gt;
# Whether the APIs are being called when the student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
# Whether the pop-up displays review comments analysis when student clicks &amp;quot;Save&amp;quot; button.&lt;br /&gt;
# Whether the pop-up displays review comments analysis when student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
# Whether the instructor is able to see each student's aggregate review analysis score when he/she views Review Reports.&lt;br /&gt;
&lt;br /&gt;
There can also be other test cases to check for UI elements and control flow tests.&lt;br /&gt;
&lt;br /&gt;
Certain edge cases to look out for:&lt;br /&gt;
# Instructor should not be shown nil/error values when a student has not submitted any reviews.&lt;br /&gt;
# Student should not be shown the pop-up on clicking the &amp;quot;back&amp;quot; button or after refreshing the page.&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:CSC517_Final_Project_Flowchart(2).png&amp;diff=129325</id>
		<title>File:CSC517 Final Project Flowchart(2).png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:CSC517_Final_Project_Flowchart(2).png&amp;diff=129325"/>
		<updated>2019-11-15T19:20:05Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128875</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128875"/>
		<updated>2019-11-12T00:40:46Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, reviewers cannot see insights on the how many problems and suggestions have been identified in their reviews. They can only submit reviews for their peers.&lt;br /&gt;
* Instructor can view insights regarding the text comments entered by the reviewers in terms of the volume of the text. Instructors do not have metrics with regards to the number of problems and suggestions identified by the reviewers.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments to determine how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course.&lt;br /&gt;
&lt;br /&gt;
== ''' Proposed Solutions ''' ==&lt;br /&gt;
* On the student review page, once a student saves his/her review, a pop can show be shown with the feedback - suggestion scores, problem scores and tone analysis among others.&lt;br /&gt;
* As an instructor, one might be able to check each student's review scores and his performance as compared with the class. These scores along with the metrics will be shown in the review report page under the metrics column.&lt;br /&gt;
&lt;br /&gt;
=== Flowchart ===&lt;br /&gt;
Given below is the design flowchart of our proposed solution:&lt;br /&gt;
  [[File:CSC517 Final Project Flowchart (1).png]]&lt;br /&gt;
&amp;lt;p&amp;gt;As a student, once the student finishes (partly or completely) giving his/her review and clicks on the &amp;quot;Save&amp;quot; or &amp;quot;Submit&amp;quot; button, the web service API will be called and the review's text will be sent as JSON. The PeerLogic web service will send back the output which will then be displayed as a pop-up to the student.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All the scores for all the reviews conducted by a student will be stored and the aggregate data will be displayed to the instructor whenever he/she will view the Review Report for any assignment/project. This will be visible in the metrics column of the review report and will be displayed student-wise, i.e., for each student participating in the assignment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ''' Anticipated Code Changes ''' ==&lt;br /&gt;
Broadly speaking, the following changes will be made:&lt;br /&gt;
* User: Student&lt;br /&gt;
  - Adding API calls of the suggestion-detection algorithm in the response_controller.rb&lt;br /&gt;
  - Adding pop-up to display summarized analysis for all comments in the review&lt;br /&gt;
  - Ensure that CORS does not need to be enabled for API call to work&lt;br /&gt;
  - Write unit tests for our method(s) in response_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in response.html.erb view&lt;br /&gt;
&lt;br /&gt;
* User: Instructor&lt;br /&gt;
  - Adding method call to display the aggregate analysis of student comments/reviews to reports_controller.rb under Metrics column&lt;br /&gt;
  - Write unit tests for our method(s) in reports_controller.rb&lt;br /&gt;
  - Write unit tests for our changes in _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
Below given scenarios is the basic overview of the tests planned on being written.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
We will test our project and added functionality using RSepc. Automated tests are carried out to test - &lt;br /&gt;
# Whether the APIs are being called when the student clicks &amp;quot;Save&amp;quot; review button.&lt;br /&gt;
# Whether the APIs are being called when the student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
# Whether the pop-up displays review comments analysis when student clicks &amp;quot;Save&amp;quot; button.&lt;br /&gt;
# Whether the pop-up displays review comments analysis when student clicks &amp;quot;Submit Review&amp;quot; button.&lt;br /&gt;
# Whether the instructor is able to see each student's aggregate review analysis score when he/she views Review Reports.&lt;br /&gt;
&lt;br /&gt;
There can also be other test cases to check for UI elements and control flow tests.&lt;br /&gt;
&lt;br /&gt;
Certain edge cases to look out for:&lt;br /&gt;
# Instructor should not be shown nil/error values when a student has not submitted any reviews.&lt;br /&gt;
# Student should not be shown the pop-up on clicking the &amp;quot;back&amp;quot; button or after refreshing the page.&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
;Mentor: Ed Gehringer (efg@ncsu.edu)&lt;br /&gt;
;Team Name: Pizzamas&lt;br /&gt;
;Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave (pdave2)&lt;br /&gt;
* Roshani Narasimhan (rnarasi2)&lt;br /&gt;
* Yash Thakkar (yrthakka) &lt;br /&gt;
&lt;br /&gt;
===References===&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128093</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128093"/>
		<updated>2019-11-10T00:25:33Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, reviewers cannot see insights on the how many problems and suggestions have been identified in their reviews. They can only submit reviews for their peers.&lt;br /&gt;
* Instructor can view insights regarding the text comments entered by the reviewers in terms of the volume of the text. Instructors do not have metrics with regards to the number of problems and suggestions identified by the reviewers.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments to determine how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course.&lt;br /&gt;
&lt;br /&gt;
== ''' Proposed Solutions ''' ==&lt;br /&gt;
* On the student review page, once a student saves his/her review, a pop can show be shown with the feedback - suggestion scores, problem scores and tone analysis among others.&lt;br /&gt;
* As an instructor, one might be able to check each student's review scores and his performance as compared with the class. These scores along with the metrics will be shown in the review report page under the metrics column. &lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Ed Gehringer&lt;br /&gt;
Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave ()&lt;br /&gt;
* Roshani ()&lt;br /&gt;
* Yash Thakkar () &lt;br /&gt;
&lt;br /&gt;
===References===&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128092</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128092"/>
		<updated>2019-11-10T00:17:03Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments to determine how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would also want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course.&lt;br /&gt;
== ''' Proposed Solutions ''' ==&lt;br /&gt;
* On the student review page, once a student saves his/her review, a pop can show be shown with the feedback - suggestion scores, problem scores and tone analysis among others.&lt;br /&gt;
* As an instructor, one might be able to check each student's review scores and his performance as compared with the class. These scores along with the metrics will be shown in the review report page under the metrics column. &lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Ed Gehringer&lt;br /&gt;
Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave ()&lt;br /&gt;
* Roshani ()&lt;br /&gt;
* Yash Thakkar () &lt;br /&gt;
&lt;br /&gt;
===References===&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128091</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128091"/>
		<updated>2019-11-10T00:16:44Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;&amp;quot; Current Implementation &amp;quot;&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments to determine how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would also want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course.&lt;br /&gt;
== ''' Proposed Solutions ''' ==&lt;br /&gt;
* On the student review page, once a student saves his/her review, a pop can show be shown with the feedback - suggestion scores, problem scores and tone analysis among others.&lt;br /&gt;
* As an instructor, one might be able to check each student's review scores and his performance as compared with the class. These scores along with the metrics will be shown in the review report page under the metrics column. &lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Ed Gehringer&lt;br /&gt;
Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave ()&lt;br /&gt;
* Roshani ()&lt;br /&gt;
* Yash Thakkar () &lt;br /&gt;
&lt;br /&gt;
===References===&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128090</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128090"/>
		<updated>2019-11-10T00:15:49Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
&lt;br /&gt;
=== Current Implementation ===&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments to determine how useful a review would be. This would motivate the reviewers to give better and constructive reviews.&lt;br /&gt;
* We would also want the instructor of the course to be able to view how many constructive reviews were provided by a reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course.&lt;br /&gt;
== ''' Proposed Solutions ''' ==&lt;br /&gt;
* On the student review page, once a student saves his/her review, a pop can show be shown with the feedback - suggestion scores, problem scores and tone analysis among others.&lt;br /&gt;
* As an instructor, one might be able to check each student's review scores and his performance as compared with the class. These scores along with the metrics will be shown in the review report page under the metrics column. &lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Ed Gehringer&lt;br /&gt;
Members:&lt;br /&gt;
* Maharshi Parekh (mgparekh)&lt;br /&gt;
* Pururaj Dave ()&lt;br /&gt;
* Roshani ()&lt;br /&gt;
* Yash Thakkar () &lt;br /&gt;
&lt;br /&gt;
===References===&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128088</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128088"/>
		<updated>2019-11-09T23:58:53Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* The Instructor is facilitated with metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
=== Current Implementation ===&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. In order to achieve this, we need to identify the suggestions in the review comments to determine how useful a review would be. This would motivate the reviewers to give better constructive reviews .&lt;br /&gt;
* We would also want the instructor of the course to be able to view how many constructive reviews were provided by a  reviewer in comparison to the average number of constructive reviews provided by the other reviewers of the course.&lt;br /&gt;
== ''' Solutions ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
&lt;br /&gt;
===References===&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128087</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128087"/>
		<updated>2019-11-09T23:53:19Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* On Expertiza, students receive review comments for their work from their peers. This review mechanism provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify problems and suggest solutions, so that the students can improve their projects. &lt;br /&gt;
* The instructor can view metrics such as average volume and total volume of the content of the reviews provided by a student.&lt;br /&gt;
=== Current Implementation ===&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* The reviewers can fill in the review comments on others' work, however they do not receive feedback on how effective their reviews are. It would thus make sense to have a feedback mechanism in place, which can identify whether a reviewer has identified problems and provided suggestions for a student or team's project. We need to identify the suggestions in the review comments to determine how useful a review would be. This would motivate the reviewers to give better constructive reviews .&lt;br /&gt;
* We would also want the instructor of the course to be able to view how many constructive reviews a reviewer has provided in comparison to the average number of constructive reviews provided by the other reviewers of the course.&lt;br /&gt;
== ''' Solutions ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
&lt;br /&gt;
===References===&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128079</id>
		<title>CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1990._Integrate_suggestion_detection_algorithm&amp;diff=128079"/>
		<updated>2019-11-09T23:23:43Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: Created page with &amp;quot;== ''' Introduction ''' == On Expertiza, students receive review comments for their work from their peers. This feature provides the students a chance to correct/modify their wor...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
On Expertiza, students receive review comments for their work from their peers. This feature provides the students a chance to correct/modify their work, based on the reviews they receive. It is expected that the reviewers identify a problem and suggest a solution, so that the students can improve their projects. Currently the review mechanisms are in place. We need to identify the suggestions in the review comments to determine how useful a review would be. This could be used as a feedback to the reviewers.&lt;br /&gt;
=== Current Implementation ===&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Solutions ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
&lt;br /&gt;
== ''' Our Work ''' ==&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
&lt;br /&gt;
===References===&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=128078</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=128078"/>
		<updated>2019-11-09T22:56:34Z</updated>

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

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E1963 Changing assignment Participant role=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
 &lt;br /&gt;
* E1963 This project aims to enable the instructor to change the role of an assignment participant. There are two ways to add a new assignment participant, first being through the Add button on the assignment participant page. Another way is to import via a spreadsheet with the list of users that are to be added. The motivation of E1963 was to enable the instructors adding these users using either of the methods mentioned above to change these users' role. A user can have one of the following roles - participant, reader, reviewer, submitter.&lt;br /&gt;
&lt;br /&gt;
* The existing UI had the a dropdown that displayed the role of the user, we have added a Submit button below each dropdown to enable the instructor to change the role of the user. On clicking the submit button, the role associated with that user is changed in the persistent storage. We have also added a flash message which confirms the change to the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following issues were targeted in this project:&lt;br /&gt;
* '''#1:'''  The instructor does not have the option to change the role of the user, once he/she has been added to the assignment. Thus, if the instructor wishes to change the role of a user from say a reviewer to a submitter, he/she is not able to save the changes.&lt;br /&gt;
* '''#2:''' With the changes made for the issue mentioned above, the instructor will be able to save the changes manually. We would like to maintain the same behavior when the assignment participants are imported from excel. Upon creating a new user using an Excel import, the user should have the role of a participant by default. An instructor was then unable to change the role of the assignment participant.&lt;br /&gt;
&lt;br /&gt;
===Navigation===&lt;br /&gt;
 Manage Assignments -&amp;gt; Add new participant icon under Actions&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
For each of the assignment participant record, there is a dropdown which contains the role of the participant. When the instructor attempts to change the value in the dropdown, it is not reflected in the backend, as there is no call associated with it, to submit the changes. Thus when the user revisits the page, the changes would he would have made are not retained. &lt;br /&gt;
&lt;br /&gt;
Authorization of the user is based on the flags can_submit, can_review and can_take_quiz flags, which are set to be true or false based on the role of the user. By default, the user is assigned the role of a participant in any assignment. Thus, the goal is to modify these flags and save them in the database when the role of the assignment participant is changed, so that it is a persistent change.&lt;br /&gt;
Authorization of the users based on the flags can be deduced as follows:&lt;br /&gt;
* Participant has can_submit=true, can_review=true and can_take_quiz=true&lt;br /&gt;
* Reader has can_submit= false, can_review=true and can_take_quiz= true&lt;br /&gt;
* Submitter has can_submit=true, can_review= false and can_take_quiz=false&lt;br /&gt;
* Reviewer has can_submit=false, can_review= true and can_take_quiz=false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Problems: &lt;br /&gt;
* 1. There is no way to change the role of the user, once the user has been added to the assignment as a participant. (Submit button now resolves this issue.)&lt;br /&gt;
* 2. Instructor is not given any confirmation that the role of the participant has been reverted to the original value once he/she navigates somewhere else. This is misleading for an instructor as the he/she might be under the impression that the changes he/she made have been saved. (Flash message now lets the user know about the change.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Snapshots depicting the issue===&lt;br /&gt;
&lt;br /&gt;
* As an Instructor, go to Manage Assignments&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot ManageAssignments.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click on add participant &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot AssignmentParticipants copy.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note that the user on the first record is currently a &amp;quot;Reader&amp;quot; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Currently Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Change the role of the &amp;quot;Reader&amp;quot; to say &amp;quot;Submitter&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submitter.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Refresh or re-navigate to this page and note that the changes are reverted&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot back to Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
&lt;br /&gt;
Changes are made in the partial for participants &amp;quot;_participant.rb&amp;quot;, so that the submit button is rendered on the view. &lt;br /&gt;
Upon changing the selected value for the user role, 'update_authorizations' method is called from participants controller which passes the participant id as a parameter to the method to change it's role in the database. The selected role is passed as a parameter 'authorization' to the update authorization method that updates the can_submit, can_take_quiz, and can_review flags appropriately for each role as described above for the selected participant id.&lt;br /&gt;
 &lt;br /&gt;
Implementing the above mentioned changes, allows the instructor to change the value of role in the dropdown which retains the corresponding record on tap of the Submit button. We have verified that the changes in the above mentioned flags are reflected in the database. The instructor will be presented with a success message on changing the role of the selected participant, on clicking submit. The instructor can revisit the page and expect the updated value to be retained. Both the problems listed above are taken care of such as the instructor is facilitated with an option to change the participant, as well as knows that the change made will be durable.&lt;br /&gt;
&lt;br /&gt;
===Snapshots after the changes===&lt;br /&gt;
&lt;br /&gt;
* Submit button has been added to each row of assignment participants&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submit Added 1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Change the &amp;quot;Reader&amp;quot; to &amp;quot;Submitter&amp;quot;, on the first record and click on submit. Changes have been persisted. Flash message confirmation is also provided to the Instructor to let him/her know of the change.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot submitter saved 2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Additional Changes===&lt;br /&gt;
&amp;lt;i&amp;gt;(These changes were not part of the assigned issue E1963, these are additional issues that we encountered while fixing E1963)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition to the above-mentioned issue, we fixed a few other issues that we observed , which were relevant to Assignment Participant and Course Participant Controllers, namely:&lt;br /&gt;
&lt;br /&gt;
'''1. Export Details''' in Assignment Participants view: We noticed that a a blank csv file was getting generated on exporting detail button in Manage Assignments. We discovered that the reason for this issue is that in the import method, the model defined was that of AssignmentParticipant whereas all the parsing methods for export were present in Assignment model. We did the required changes, tested the functionality and note that this is working fine now.&lt;br /&gt;
The changes for this are made in the common module - export_file_controller.rb following which the export and export_details methods are now called from the assignment.rb as opposed to assignment_participant.rb where there are no export methods and their corresponding implementations.&lt;br /&gt;
Now, the Export Detail button generates a comma-seperated file with the following headers:&lt;br /&gt;
* Assignment Name&lt;br /&gt;
* Assignment Instructor&lt;br /&gt;
* Team ID / Author ID	&lt;br /&gt;
* Reviewee (Team / Student Name)&lt;br /&gt;
* Reviewer&lt;br /&gt;
* Question / Criterion&lt;br /&gt;
* Question ID&lt;br /&gt;
* Answer / Comment ID&lt;br /&gt;
* Answer / Comment&lt;br /&gt;
* Score&lt;br /&gt;
&lt;br /&gt;
'''2. ''' Along with the previous issue, we found that since the partials were shared among Assignment Participant and Course Participant, Course Participant also had the Export Details section and the corresponding button. However, it is not required and we believe that it should be removed from the view. We consulted Dr. Gehringer and based on his feedback as well, we removed the semi-view consisting of &amp;quot;Export Details&amp;quot; from Course Participant. The changes are made in the file &amp;quot;start.html.erb&amp;quot; by using conditional rendering of the partial based on the model name.&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Remove Export Detauls.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Remove Export Details.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. Missing Handle: Assignment Participant''' on adding a new Assignment Participant: We observed that when a new assignment participant is created, if a user already exists with the username, the existing user is added to that Assignment and his existing handle attribute in Users table is mapped to the handle attribute in Participants table. However, if a new user is added not currently in the Users table, a new entry is created first in the Users table and is then replicated in the Participants table. Although, we noticed that the handle attribute in Participants table was coming as null. We fixed this issue by making change in the define_attributes method in ImportFileHelper.rb.&lt;br /&gt;
&lt;br /&gt;
'''4. Import Assignment Participants''' was not working - It is expected that if a user does not exist in the system, on importing assignment participants, a user will be created and he/she will be added to the assignment as a participant. With the current implementation, the user was getting created, however corresponding AssignmentParticipant was not getting created due to a validation with respect to handle. We have fixed this issue by setting the handle in AssignmentParticipants to be the same as the name of the user created (in accordance with the current functionality - when a user is added as an AssignmentParticipant from the UI). This facilitates us to import AssignmentParticipants. &lt;br /&gt;
The mandatory minimal attributes required to import an assignment participant are :&lt;br /&gt;
* Username&lt;br /&gt;
* Full name&lt;br /&gt;
* Email id &lt;br /&gt;
* Password.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. The role in the Assignment Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''6. The role in the Course Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Participant CP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant Role CP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
Rspec test has been added to check the update authorizations functionality in the participants_controller_spec.rb. The test verifies the change of flags mentioned above as per the authorization of the user. The tests also checks whether the expected flash message is visible on the UI. Code coverage is 100% for all the code that we have added in the controllers, as part of this project. We checked the code coverage using Ruby Code Coverage plugin and SimpleCov gem. Please see the coverage of the code as shown in the screenshot below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot code coverage.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please find the test below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#validate_authorizations' do&lt;br /&gt;
  #Test case for successful update of participant to reviewer, expects the success flash message&lt;br /&gt;
  it 'updates the authorizations for the participant to make them reviewer' do&lt;br /&gt;
    allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
    params = {authorization: 'reviewer', id: 1}&lt;br /&gt;
    session = {user: instructor}&lt;br /&gt;
    get :update_authorizations, params, session&lt;br /&gt;
    expect(flash[:success]).to eq 'The role of the selected participants has been successfully updated.'&lt;br /&gt;
    expect(participant.can_review).to eq(true)&lt;br /&gt;
    expect(participant.can_submit).to eq(false)&lt;br /&gt;
    expect(participant.can_take_quiz).to eq(false)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  #Test for case where we expect to encounter an error in update_attributes method&lt;br /&gt;
  it ' throws an exception while validating authorizations' do&lt;br /&gt;
    allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
    allow(participant).to receive(:update_attributes).and_raise(StandardError)&lt;br /&gt;
    params = {authorization: 'reviewer', id: 1}&lt;br /&gt;
    session = {user: instructor}&lt;br /&gt;
    get :update_authorizations, params, session&lt;br /&gt;
    expect(flash[:error]).to eq 'The update action failed.'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Team===&lt;br /&gt;
#Natansh Negi (nnegi2@ncsu.edu)&lt;br /&gt;
#Richa Dua (rdua2@ncsu.edu)&lt;br /&gt;
#Roshani Narasimhan (rnarasi2@ncsu.edu)&lt;br /&gt;
'''Mentor:''' Sharique Khan (mkhan8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to expertiza]&lt;br /&gt;
* [https://github.com/RoshaniN/expertiza-team-622.git Link to changes E1963]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1533 Link to Pull request]&lt;br /&gt;
* [http://152.46.19.56:8080/ Link to deployed application on VCL]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127429</id>
		<title>CSC/ECE 517 Fall 2019 - E1963. Changing assignment participant role</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127429"/>
		<updated>2019-11-06T21:59:34Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E1963 Changing assignment Participant role=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
 &lt;br /&gt;
* E1963 This project aims to enable the instructor to change the role of an assignment participant. There are two ways to add a new assignment participant, first being through the Add button on the assignment participant page. Another way is to import via a spreadsheet with the list of users that are to be added. The motivation of E1963 was to enable the instructors adding these users using either of the methods mentioned above to change these users' role. A user can have one of the following roles - participant, reader, reviewer, submitter.&lt;br /&gt;
&lt;br /&gt;
* The existing UI had the a dropdown that displayed the role of the user, we have added a Submit button below each dropdown to enable the instructor to change the role of the user. On clicking the submit button, the role associated with that user is changed in the persistent storage. We have also added a flash message which confirms the change to the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following issues were targeted in this project:&lt;br /&gt;
* '''#1:'''  The instructor does not have the option to change the role of the user, once he/she has been added to the assignment. Thus, if the instructor wishes to change the role of a user from say a reviewer to a submitter, he/she is not able to save the changes.&lt;br /&gt;
* '''#2:''' With the changes made for the issue mentioned above, the instructor will be able to save the changes manually. We would like to maintain the same behavior when the assignment participants are imported from excel. Upon creating a new user using an Excel import, the user should have the role of a participant by default. An instructor was then unable to change the role of the assignment participant.&lt;br /&gt;
&lt;br /&gt;
===Navigation===&lt;br /&gt;
 Manage Assignments -&amp;gt; Add new participant &lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
For each of the assignment participant record, there is a dropdown which contains the role of the participant. When the instructor attempts to change the value in the dropdown, it is not reflected in the backend, as there is no call associated with it, to submit the changes. Thus when the user revisits the page, the changes would he would have made are not retained. &lt;br /&gt;
&lt;br /&gt;
Authorization of the user is based on the flags can_submit, can_review and can_take_quiz flags, which are set to be true or false based on the role of the user. By default, the user is assigned the role of a participant in any assignment. Thus, the goal is to modify these flags and save them in the database when the role of the assignment participant is changed, so that it is a persistent change.&lt;br /&gt;
Authorization of the users based on the flags can be deduced as follows:&lt;br /&gt;
* Participant has can_submit=true, can_review=true and can_take_quiz=true&lt;br /&gt;
* Reader has can_submit= false, can_review=true and can_take_quiz= true&lt;br /&gt;
* Submitter has can_submit=true, can_review= false and can_take_quiz=false&lt;br /&gt;
* Reviewer has can_submit=false, can_review= true and can_take_quiz=false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Problems: &lt;br /&gt;
* 1. There is no way to change the role of the user, once the user has been added to the assignment as a participant. (Submit button now resolves this issue.)&lt;br /&gt;
* 2. Instructor is not given any confirmation that the role of the participant has been reverted to the original value once he/she navigates somewhere else. This is misleading for an instructor as the he/she might be under the impression that the changes he/she made have been saved. (Flash message now lets the user know about the change.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Snapshots depicting the issue===&lt;br /&gt;
&lt;br /&gt;
* As an Instructor, go to Manage Assignments&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot ManageAssignments.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click on add participant &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot AssignmentParticipants copy.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note that the user on the first record is currently a &amp;quot;Reader&amp;quot; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Currently Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Change the role of the &amp;quot;Reader&amp;quot; to say &amp;quot;Submitter&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submitter.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Refresh or re-navigate to this page and note that the changes are reverted&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot back to Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
&lt;br /&gt;
Changes are made in the partial for participants &amp;quot;_participant.rb&amp;quot;, so that the submit button is rendered on the view. &lt;br /&gt;
Upon changing the selected value for the user role, 'update_authorizations' method is called from participants controller which passes the participant id as a parameter to the method to change it's role in the database. The selected role is passed as a parameter 'authorization' to the update authorization method that updates the can_submit, can_take_quiz, and can_review flags appropriately for each role as described above for the selected participant id.&lt;br /&gt;
 &lt;br /&gt;
Implementing the above mentioned changes, allows the instructor to change the value of role in the dropdown which retains the corresponding record on tap of the Submit button. We have verified that the changes in the above mentioned flags are reflected in the database. The instructor will be presented with a success message on changing the role of the selected participant, on clicking submit. The instructor can revisit the page and expect the updated value to be retained. Both the problems listed above are taken care of such as the instructor is facilitated with an option to change the participant, as well as knows that the change made will be durable.&lt;br /&gt;
&lt;br /&gt;
===Snapshots after the changes===&lt;br /&gt;
&lt;br /&gt;
* Submit button has been added to each row of assignment participants&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submit Added 1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Change the &amp;quot;Reader&amp;quot; to &amp;quot;Submitter&amp;quot;, on the first record and click on submit. Changes have been persisted. Flash message confirmation is also provided to the Instructor to let him/her know of the change.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot submitter saved 2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Additional Changes===&lt;br /&gt;
&amp;lt;i&amp;gt;(These changes were not part of the assigned issue E1963, these are additional issues that we encountered while fixing E1963)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition to the above-mentioned issue, we fixed a few other issues that we observed , which were relevant to Assignment Participant and Course Participant Controllers, namely:&lt;br /&gt;
&lt;br /&gt;
'''1. Export Details''' in Assignment Participants view: We noticed that a a blank csv file was getting generated on exporting detail button in Manage Assignments. We discovered that the reason for this issue is that in the import method, the model defined was that of AssignmentParticipant whereas all the parsing methods for export were present in Assignment model. We did the required changes, tested the functionality and note that this is working fine now.&lt;br /&gt;
The changes for this are made in the common module - export_file_controller.rb following which the export and export_details methods are now called from the assignment.rb as opposed to assignment_participant.rb where there are no export methods and their corresponding implementations.&lt;br /&gt;
Now, the Export Detail button generates a comma-seperated file with the following headers:&lt;br /&gt;
* Assignment Name&lt;br /&gt;
* Assignment Instructor&lt;br /&gt;
* Team ID / Author ID	&lt;br /&gt;
* Reviewee (Team / Student Name)&lt;br /&gt;
* Reviewer&lt;br /&gt;
* Question / Criterion&lt;br /&gt;
* Question ID&lt;br /&gt;
* Answer / Comment ID&lt;br /&gt;
* Answer / Comment&lt;br /&gt;
* Score&lt;br /&gt;
&lt;br /&gt;
'''2. ''' Along with the previous issue, we found that since the partials were shared among Assignment Participant and Course Participant, Course Participant also had the Export Details section and the corresponding button. However, it is not required and we believe that it should be removed from the view. We consulted Dr. Gehringer and based on his feedback as well, we removed the semi-view consisting of &amp;quot;Export Details&amp;quot; from Course Participant. The changes are made in the file &amp;quot;start.html.erb&amp;quot; by using conditional rendering of the partial based on the model name.&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Remove Export Detauls.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Remove Export Details.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. Missing Handle: Assignment Participant''' on adding a new Assignment Participant: We observed that when a new assignment participant is created, if a user already exists with the username, the existing user is added to that Assignment and his existing handle attribute in Users table is mapped to the handle attribute in Participants table. However, if a new user is added not currently in the Users table, a new entry is created first in the Users table and is then replicated in the Participants table. Although, we noticed that the handle attribute in Participants table was coming as null. We fixed this issue by making change in the define_attributes method in ImportFileHelper.rb.&lt;br /&gt;
&lt;br /&gt;
'''4. Import Assignment Participants''' was not working - It is expected that if a user does not exist in the system, on importing assignment participants, a user will be created and he/she will be added to the assignment as a participant. With the current implementation, the user was getting created, however corresponding AssignmentParticipant was not getting created due to a validation with respect to handle. We have fixed this issue by setting the handle in AssignmentParticipants to be the same as the name of the user created (in accordance with the current functionality - when a user is added as an AssignmentParticipant from the UI). This facilitates us to import AssignmentParticipants. &lt;br /&gt;
The mandatory minimal attributes required to import an assignment participant are :&lt;br /&gt;
* Username&lt;br /&gt;
* Full name&lt;br /&gt;
* Email id &lt;br /&gt;
* Password.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. The role in the Assignment Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''6. The role in the Course Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Participant CP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant Role CP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
Rspec test has been added to check the update authorizations functionality in the participants_controller_spec.rb. The test verifies the change of flags mentioned above as per the authorization of the user. The tests also checks whether the expected flash message is visible on the UI. Code coverage is 100% for all the code that we have added in the controllers, as part of this project. We checked the code coverage using Ruby Code Coverage plugin and SimpleCov gem. Please see the coverage of the code as shown in the screenshot below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot code coverage.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please find the test below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#validate_authorizations' do&lt;br /&gt;
  #Test case for successful update of participant to reviewer, expects the success flash message&lt;br /&gt;
  it 'updates the authorizations for the participant to make them reviewer' do&lt;br /&gt;
    allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
    params = {authorization: 'reviewer', id: 1}&lt;br /&gt;
    session = {user: instructor}&lt;br /&gt;
    get :update_authorizations, params, session&lt;br /&gt;
    expect(flash[:success]).to eq 'The role of the selected participants has been successfully updated.'&lt;br /&gt;
    expect(participant.can_review).to eq(true)&lt;br /&gt;
    expect(participant.can_submit).to eq(false)&lt;br /&gt;
    expect(participant.can_take_quiz).to eq(false)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  #Test for case where we expect to encounter an error in update_attributes method&lt;br /&gt;
  it ' throws an exception while validating authorizations' do&lt;br /&gt;
    allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
    allow(participant).to receive(:update_attributes).and_raise(StandardError)&lt;br /&gt;
    params = {authorization: 'reviewer', id: 1}&lt;br /&gt;
    session = {user: instructor}&lt;br /&gt;
    get :update_authorizations, params, session&lt;br /&gt;
    expect(flash[:error]).to eq 'The update action failed.'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Team===&lt;br /&gt;
#Natansh Negi (nnegi2@ncsu.edu)&lt;br /&gt;
#Richa Dua (rdua2@ncsu.edu)&lt;br /&gt;
#Roshani Narasimhan (rnarasi2@ncsu.edu)&lt;br /&gt;
'''Mentor:''' Sharique Khan (mkhan8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to expertiza]&lt;br /&gt;
* [https://github.com/RoshaniN/expertiza-team-622.git Link to changes E1963]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1533 Link to Pull request]&lt;br /&gt;
* [http://152.46.19.56:8080/ Link to deployed application on VCL]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127428</id>
		<title>CSC/ECE 517 Fall 2019 - E1963. Changing assignment participant role</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127428"/>
		<updated>2019-11-06T21:57:19Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E1963 Changing assignment Participant role=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
 &lt;br /&gt;
* E1963 This project aims to enable the instructor to change the role of an assignment participant. There are two ways to add a new assignment participant, first being through the Add button on the assignment participant page. Another way is to import via a spreadsheet with the list of users that are to be added. The motivation of E1963 was to enable the instructors adding these users using either of the methods mentioned above to change these users' role. A user can have one of the following roles - participant, reader, reviewer, submitter.&lt;br /&gt;
&lt;br /&gt;
* The existing UI had the a dropdown that displayed the role of the user, we have added a Submit button below each dropdown to enable the instructor to change the role of the user. On clicking the submit button, the role associated with that user is changed in the persistent storage. We have also added a flash message which confirms the change to the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following issues were targeted in this project:&lt;br /&gt;
* '''#1:'''  The instructor does not have the option to change the role of the user, once he/she has been added to the assignment. Thus, if the instructor wishes to change the role of a user from say a reviewer to a submitter, he/she is not able to save the changes.&lt;br /&gt;
* '''#2:''' With the changes made for the issue mentioned above, the instructor will be able to save the changes manually. We would like to maintain the same behavior when the assignment participants are imported from excel. Upon creating a new user using an Excel import, the user should have the role of a participant by default. An instructor was then unable to change the role of the assignment participant.&lt;br /&gt;
&lt;br /&gt;
===Navigation===&lt;br /&gt;
 Manage Assignments -&amp;gt; Add new participant &lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
For each of the assignment participant record, there is a dropdown which contains the role of the participant. When the instructor attempts to change the value in the dropdown, it is not reflected in the backend, as there is no call associated with it, to submit the changes. Thus when the user revisits the page, the changes would he would have made are not retained. &lt;br /&gt;
&lt;br /&gt;
Authorization of the user is based on the flags can_submit, can_review and can_take_quiz flags, which are set to be true or false based on the role of the user. By default, the user is assigned the role of a participant in any assignment. Thus, the goal is to modify these flags and save them in the database when the role of the assignment participant is changed, so that it is a persistent change.&lt;br /&gt;
Authorization of the users based on the flags can be deduced as follows:&lt;br /&gt;
* Participant has can_submit=true, can_review=true and can_take_quiz=true&lt;br /&gt;
* Reader has can_submit= false, can_review=true and can_take_quiz= true&lt;br /&gt;
* Submitter has can_submit=true, can_review= false and can_take_quiz=false&lt;br /&gt;
* Reviewer has can_submit=false, can_review= true and can_take_quiz=false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Problems: &lt;br /&gt;
* 1. There is no way to change the role of the user, once the user has been added to the assignment as a participant. (Submit button now resolves this issue.)&lt;br /&gt;
* 2. Instructor is not given any confirmation that the role of the participant has been reverted to the original value once he/she navigates somewhere else. This is misleading for an instructor as the he/she might be under the impression that the changes he/she made have been saved. (Flash message now lets the user know about the change.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Snapshots depicting the issue===&lt;br /&gt;
&lt;br /&gt;
* As an Instructor, go to Manage Assignments&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot ManageAssignments.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click on add participant &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot AssignmentParticipants copy.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note that the user on the first record is currently a &amp;quot;Reader&amp;quot; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Currently Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Change the role of the &amp;quot;Reader&amp;quot; to say &amp;quot;Submitter&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submitter.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Refresh or re-navigate to this page and note that the changes are reverted&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot back to Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
&lt;br /&gt;
Changes are made in the partial for participants &amp;quot;_participant.rb&amp;quot;, so that the submit button is rendered on the view. &lt;br /&gt;
Upon changing the selected value for the user role, 'update_authorizations' method is called from participants controller which passes the participant id as a parameter to the method to change it's role in the database. The selected role is passed as a parameter 'authorization' to the update authorization method that updates the can_submit, can_take_quiz, and can_review flags appropriately for each role as described above for the selected participant id.&lt;br /&gt;
 &lt;br /&gt;
Implementing the above mentioned changes, allows the instructor to change the value of role in the dropdown which retains the corresponding record on tap of the Submit button. We have verified that the changes in the above mentioned flags are reflected in the database. The instructor will be presented with a success message on changing the role of the selected participant, on clicking submit. The instructor can revisit the page and expect the updated value to be retained. Both the problems listed above are taken care of such as the instructor is facilitated with an option to change the participant, as well as knows that the change made will be durable.&lt;br /&gt;
&lt;br /&gt;
===Snapshots after the changes===&lt;br /&gt;
&lt;br /&gt;
* Submit button has been added to each row of assignment participants&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submit Added 1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Change the &amp;quot;Reader&amp;quot; to &amp;quot;Submitter&amp;quot;, on the first record and click on submit. Changes have been persisted. Flash message confirmation is also provided to the Instructor to let him/her know of the change.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot submitter saved 2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Additional Changes===&lt;br /&gt;
&amp;lt;i&amp;gt;(These changes were not part of the assigned issue E1963, these are additional issues that we encountered while fixing E1963)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition to the above-mentioned issue, we fixed a few other issues that we observed , which were relevant to Assignment Participant and Course Participant Controllers, namely:&lt;br /&gt;
&lt;br /&gt;
'''1. Export Details''' in Assignment Participants view: We noticed that a a blank csv file was getting generated on exporting detail button in Manage Assignments. We discovered that the reason for this issue is that in the import method, the model defined was that of AssignmentParticipant whereas all the parsing methods for export were present in Assignment model. We did the required changes, tested the functionality and note that this is working fine now.&lt;br /&gt;
The changes for this are made in the common module - export_file_controller.rb following which the export and export_details methods are now called from the assignment.rb as opposed to assignment_participant.rb where there are no export methods and their corresponding implementations.&lt;br /&gt;
Now, the Export Detail button generates a comma-seperated file with the following headers:&lt;br /&gt;
* Assignment Name&lt;br /&gt;
* Assignment Instructor&lt;br /&gt;
* Team ID / Author ID	&lt;br /&gt;
* Reviewee (Team / Student Name)&lt;br /&gt;
* Reviewer&lt;br /&gt;
* Question / Criterion&lt;br /&gt;
* Question ID&lt;br /&gt;
* Answer / Comment ID&lt;br /&gt;
* Answer / Comment&lt;br /&gt;
* Score&lt;br /&gt;
&lt;br /&gt;
'''2. ''' Along with the previous issue, we found that since the partials were shared among Assignment Participant and Course Participant, Course Participant also had the Export Details section and the corresponding button. However, it is not required and we believe that it should be removed from the view. We consulted Dr. Gehringer and based on his feedback as well, we removed the semi-view consisting of &amp;quot;Export Details&amp;quot; from Course Participant. The changes are made in the file &amp;quot;start.html.erb&amp;quot; by using conditional rendering of the partial based on the model name.&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Remove Export Detauls.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Remove Export Details.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. Missing Handle: Assignment Participant''' on adding a new Assignment Participant: We observed that when a new assignment participant is created, if a user already exists with the username, the existing user is added to that Assignment and his existing handle attribute in Users table is mapped to the handle attribute in Participants table. However, if a new user is added not currently in the Users table, a new entry is created first in the Users table and is then replicated in the Participants table. Although, we noticed that the handle attribute in Participants table was coming as null. We fixed this issue by making change in the define_attributes method in ImportFileHelper.rb.&lt;br /&gt;
&lt;br /&gt;
'''4. Import Assignment Participants''' was not working - It is expected that if a user does not exist in the system, on importing assignment participants, a user will be created and he/she will be added to the assignment as a participant. With the current implementation, the user was getting created, however corresponding AssignmentParticipant was not getting created due to a validation with respect to handle. We have fixed this issue by setting the handle in AssignmentParticipants to be the same as the name of the user created (in accordance with the current functionality - when a user is added as an AssignmentParticipant from the UI). This facilitates us to import AssignmentParticipants. &lt;br /&gt;
The mandatory minimal attributes required to import an assignment participant are :&lt;br /&gt;
* Username&lt;br /&gt;
* Full name&lt;br /&gt;
* Email id &lt;br /&gt;
* Password.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. The role in the Assignment Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''6. The role in the Course Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Participant CP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant Role CP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
Rspec test has been added to check the update authorizations functionality in the participants_controller_spec.rb. The test verifies the change of flags mentioned above as per the authorization of the user. The tests also checks whether the expected flash message is visible on the UI. Code coverage is 100% for all the code that we have added in the controllers, as part of this project. We checked the code coverage using Ruby Code Coverage plugin and SimpleCov gem. Please see the coverage of the code as shown in the screenshot below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot code coverage.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please find the test below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#validate_authorizations' do&lt;br /&gt;
  #Test case for successful update of participant to reviewer, checks the success flash message&lt;br /&gt;
  it 'updates the authorizations for the participant to make them reviewer' do&lt;br /&gt;
    allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
    params = {authorization: 'reviewer', id: 1}&lt;br /&gt;
    session = {user: instructor}&lt;br /&gt;
    get :update_authorizations, params, session&lt;br /&gt;
    # if can_submit == false and can_review == true and can_take_quiz == false&lt;br /&gt;
    expect(flash[:success]).to eq 'The role of the selected participants has been successfully updated.'&lt;br /&gt;
    expect(participant.can_review).to eq(true)&lt;br /&gt;
    expect(participant.can_submit).to eq(false)&lt;br /&gt;
    expect(participant.can_take_quiz).to eq(false)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  #Test for case where we encounter an error in update_attributes method&lt;br /&gt;
  it ' throws an exception while validating authorizations' do&lt;br /&gt;
    allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
    allow(participant).to receive(:update_attributes).and_raise(StandardError)&lt;br /&gt;
    params = {authorization: 'reviewer', id: 1}&lt;br /&gt;
    session = {user: instructor}&lt;br /&gt;
    get :update_authorizations, params, session&lt;br /&gt;
    # if can_submit == false and can_review == true and can_take_quiz == false&lt;br /&gt;
    # can check the flash message&lt;br /&gt;
    expect(flash[:error]).to eq 'The update action failed.'&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Team===&lt;br /&gt;
#Natansh Negi (nnegi2@ncsu.edu)&lt;br /&gt;
#Richa Dua (rdua2@ncsu.edu)&lt;br /&gt;
#Roshani Narasimhan (rnarasi2@ncsu.edu)&lt;br /&gt;
'''Mentor:''' Sharique Khan (mkhan8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to expertiza]&lt;br /&gt;
* [https://github.com/RoshaniN/expertiza-team-622.git Link to changes E1963]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1533 Link to Pull request]&lt;br /&gt;
* [http://152.46.19.56:8080/ Link to deployed application on VCL]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127392</id>
		<title>CSC/ECE 517 Fall 2019 - E1963. Changing assignment participant role</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127392"/>
		<updated>2019-11-06T21:10:52Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E1963 Changing assignment Participant role=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
 &lt;br /&gt;
* E1963 This project aims to enable the instructor to change the role of an assignment participant. There are two ways to add a new assignment participant, first being through the Add button on the assignment participant page. Another way is to import via a spreadsheet with the list of users that are to be added. The motivation of E1963 was to enable the instructors adding these users using either of the methods mentioned above to change these users' role. A user can have one of the following roles - participant, reader, reviewer, submitter.&lt;br /&gt;
&lt;br /&gt;
* The existing UI had the a dropdown that displayed the role of the user, we have added a Submit button below each dropdown to enable the instructor to change the role of the user. On clicking the submit button, the role associated with that user is changed in the persistent storage. We have also added a flash message which confirms the change to the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following issues were targeted in this project:&lt;br /&gt;
* '''#1:'''  The instructor does not have the option to change the role of the user, once he/she has been added to the assignment. Thus, if the instructor wishes to change the role of a user from say a reviewer to a submitter, he/she is not able to save the changes.&lt;br /&gt;
* '''#2:''' With the changes made for the issue mentioned above, the instructor will be able to save the changes manually. We would like to maintain the same behavior when the assignment participants are imported from excel. Upon creating a new user using an Excel import, the user should have the role of a participant by default. An instructor was then unable to change the role of the assignment participant.&lt;br /&gt;
&lt;br /&gt;
===Navigation===&lt;br /&gt;
 Manage Assignments -&amp;gt; Add new participant &lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
For each of the assignment participant record, there is a dropdown which contains the role of the participant. When the instructor attempts to change the value in the dropdown, it is not reflected in the backend, as there is no call associated with it, to submit the changes. Thus when the user revisits the page, the changes would he would have made are not retained. &lt;br /&gt;
&lt;br /&gt;
Authorization of the user is based on the flags can_submit, can_review and can_take_quiz flags, which are set to be true or false based on the role of the user. By default, the user is assigned the role of a participant in any assignment. Thus, the goal is to modify these flags and save them in the database when the role of the assignment participant is changed, so that it is a persistent change.&lt;br /&gt;
Authorization of the users based on the flags can be deduced as follows:&lt;br /&gt;
* Participant has can_submit=true, can_review=true and can_take_quiz=true&lt;br /&gt;
* Reader has can_submit= false, can_review=true and can_take_quiz= true&lt;br /&gt;
* Submitter has can_submit=true, can_review= false and can_take_quiz=false&lt;br /&gt;
* Reviewer has can_submit=false, can_review= true and can_take_quiz=false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Problems: &lt;br /&gt;
* 1. There is no way to change the role of the user, once the user has been added to the assignment as a participant. (Submit button now resolves this issue.)&lt;br /&gt;
* 2. Instructor is not given any confirmation that the role of the participant has been reverted to the original value once he/she navigates somewhere else. This is misleading for an instructor as the he/she might be under the impression that the changes he/she made have been saved. (Flash message now lets the user know about the change.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Snapshots depicting the issue===&lt;br /&gt;
&lt;br /&gt;
* As an Instructor, go to Manage Assignments&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot ManageAssignments.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click on add participant &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot AssignmentParticipants copy.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note that the user on the first record is currently a &amp;quot;Reader&amp;quot; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Currently Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Change the role of the &amp;quot;Reader&amp;quot; to say &amp;quot;Submitter&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submitter.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Refresh or re-navigate to this page and note that the changes are reverted&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot back to Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
&lt;br /&gt;
Changes are made in the partial for participants &amp;quot;_participant.rb&amp;quot;, so that the submit button is rendered on the view. &lt;br /&gt;
Upon changing the selected value for the user role, 'update_authorizations' method is called from participants controller which passes the participant id as a parameter to the method to change it's role in the database. The selected role is passed as a parameter 'authorization' to the update authorization method that updates the can_submit, can_take_quiz, and can_review flags appropriately for each role as described above for the selected participant id.&lt;br /&gt;
 &lt;br /&gt;
Implementing the above mentioned changes, allows the instructor to change the value of role in the dropdown which retains the corresponding record on tap of the Submit button. We have verified that the changes in the above mentioned flags are reflected in the database. The instructor will be presented with a success message on changing the role of the selected participant, on clicking submit. The instructor can revisit the page and expect the updated value to be retained. Both the problems listed above are taken care of such as the instructor is facilitated with an option to change the participant, as well as knows that the change made will be durable.&lt;br /&gt;
&lt;br /&gt;
===Snapshots after the changes===&lt;br /&gt;
&lt;br /&gt;
* Submit button has been added to each row of assignment participants&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submit Added 1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Change the &amp;quot;Reader&amp;quot; to &amp;quot;Submitter&amp;quot;, on the first record and click on submit. Changes have been persisted. Flash message confirmation is also provided to the Instructor to let him/her know of the change.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot submitter saved 2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Additional Changes===&lt;br /&gt;
&amp;lt;i&amp;gt;(These changes were not part of the assigned issue E1963, these are additional issues that we encountered while fixing E1963)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition to the above-mentioned issue, we fixed a few other issues that we observed , which were relevant to Assignment Participant and Course Participant Controllers, namely:&lt;br /&gt;
&lt;br /&gt;
'''1. Export Details''' in Assignment Participants view: We noticed that a a blank csv file was getting generated on exporting detail button in Manage Assignments. We discovered that the reason for this issue is that in the import method, the model defined was that of AssignmentParticipant whereas all the parsing methods for export were present in Assignment model. We did the required changes, tested the functionality and note that this is working fine now.&lt;br /&gt;
The changes for this are made in the common module - export_file_controller.rb following which the export and export_details methods are now called from the assignment.rb as opposed to assignment_participant.rb where there are no export methods and their corresponding implementations.&lt;br /&gt;
Now, the Export Detail button generates a comma-seperated file with the following headers:&lt;br /&gt;
* Assignment Name&lt;br /&gt;
* Assignment Instructor&lt;br /&gt;
* Team ID / Author ID	&lt;br /&gt;
* Reviewee (Team / Student Name)&lt;br /&gt;
* Reviewer&lt;br /&gt;
* Question / Criterion&lt;br /&gt;
* Question ID&lt;br /&gt;
* Answer / Comment ID&lt;br /&gt;
* Answer / Comment&lt;br /&gt;
* Score&lt;br /&gt;
&lt;br /&gt;
'''2. ''' Along with the previous issue, we found that since the partials were shared among Assignment Participant and Course Participant, Course Participant also had the Export Details section and the corresponding button. However, it is not required and we believe that it should be removed from the view. We consulted Dr. Gehringer and based on his feedback as well, we removed the semi-view consisting of &amp;quot;Export Details&amp;quot; from Course Participant. The changes are made in the file &amp;quot;start.html.erb&amp;quot; by using conditional rendering of the partial based on the model name.&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Remove Export Detauls.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Remove Export Details.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. Missing Handle: Assignment Participant''' on adding a new Assignment Participant: We observed that when a new assignment participant is created, if a user already exists with the username, the existing user is added to that Assignment and his existing handle attribute in Users table is mapped to the handle attribute in Participants table. However, if a new user is added not currently in the Users table, a new entry is created first in the Users table and is then replicated in the Participants table. Although, we noticed that the handle attribute in Participants table was coming as null. We fixed this issue by making change in the define_attributes method in ImportFileHelper.rb.&lt;br /&gt;
&lt;br /&gt;
'''4. Import Assignment Participants''' was not working - It is expected that if a user does not exist in the system, on importing assignment participants, a user will be created and he/she will be added to the assignment as a participant. With the current implementation, the user was getting created, however corresponding AssignmentParticipant was not getting created due to a validation with respect to handle. We have fixed this issue by setting the handle in AssignmentParticipants to be the same as the name of the user created (in accordance with the current functionality - when a user is added as an AssignmentParticipant from the UI). This facilitates us to import AssignmentParticipants. &lt;br /&gt;
The mandatory minimal attributes required to import an assignment participant are :&lt;br /&gt;
* Username&lt;br /&gt;
* Full name&lt;br /&gt;
* Email id &lt;br /&gt;
* Password.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. The role in the Assignment Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''6. The role in the Course Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Participant CP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant Role CP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
Rspec test has been added to check the update authorizations functionality in the participants_controller_spec.rb. The test verifies the change of flags mentioned above as per the authorization of the user. The tests also checks whether the expected flash message is visible on the UI. Code coverage is 100% for all the code that we have added in the controllers, as part of this project. We checked the code coverage using Ruby Code Coverage plugin and SimpleCov gem. Please see the coverage of the code as shown in the screenshot below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot code coverage.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Team===&lt;br /&gt;
#Natansh Negi (nnegi2@ncsu.edu)&lt;br /&gt;
#Richa Dua (rdua2@ncsu.edu)&lt;br /&gt;
#Roshani Narasimhan (rnarasi2@ncsu.edu)&lt;br /&gt;
'''Mentor:''' Sharique Khan (mkhan8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to expertiza]&lt;br /&gt;
* [https://github.com/RoshaniN/expertiza-team-622.git Link to changes E1963]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1533 Link to Pull request]&lt;br /&gt;
* [http://152.46.19.56:8080/ Link to deployed application on VCL]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127390</id>
		<title>CSC/ECE 517 Fall 2019 - E1963. Changing assignment participant role</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127390"/>
		<updated>2019-11-06T21:09:52Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E1963 Changing assignment Participant role=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
 &lt;br /&gt;
* E1963 This project aims to enable the instructor to change the role of an assignment participant. There are two ways to add a new assignment participant, first being through the Add button on the assignment participant page. Another way is to import via a spreadsheet with the list of users that are to be added. The motivation of E1963 was to enable the instructors adding these users using either of the methods mentioned above to change these users' role. A user can have one of the following roles - participant, reader, reviewer, submitter.&lt;br /&gt;
&lt;br /&gt;
* The existing UI had the a dropdown that displayed the role of the user, we have added a Submit button below each dropdown to enable the instructor to change the role of the user. On clicking the submit button, the role associated with that user is changed in the persistent storage. We have also added a flash message which confirms the change to the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following issues were targeted in this project:&lt;br /&gt;
* '''#1:'''  The instructor does not have the option to change the role of the user, once he/she has been added to the assignment. Thus, if the instructor wishes to change the role of a user from say a reviewer to a submitter, he/she is not able to save the changes.&lt;br /&gt;
* '''#2:''' With the changes made for the issue mentioned above, the instructor will be able to save the changes manually. We would like to maintain the same behavior when the assignment participants are imported from excel. Upon creating a new user using an Excel import, the user should have the role of a participant by default. An instructor was then unable to change the role of the assignment participant.&lt;br /&gt;
&lt;br /&gt;
===Navigation===&lt;br /&gt;
 Manage Assignments -&amp;gt; Add new participant &lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
For each of the assignment participant record, there is a dropdown which contains the role of the participant. When the instructor attempts to change the value in the dropdown, it is not reflected in the backend, as there is no call associated with it, to submit the changes. Thus when the user revisits the page, the changes would he would have made are not retained. &lt;br /&gt;
&lt;br /&gt;
Authorization of the user is based on the flags can_submit, can_review and can_take_quiz flags, which are set to be true or false based on the role of the user. By default, the user is assigned the role of a participant in any assignment. Thus, the goal is to modify these flags and save them in the database when the role of the assignment participant is changed, so that it is a persistent change.&lt;br /&gt;
Authorization of the users based on the flags can be deduced as follows:&lt;br /&gt;
* Participant has can_submit=true, can_review=true and can_take_quiz=true&lt;br /&gt;
* Reader has can_submit= false, can_review=true and can_take_quiz= true&lt;br /&gt;
* Submitter has can_submit=true, can_review= false and can_take_quiz=false&lt;br /&gt;
* Reviewer has can_submit=false, can_review= true and can_take_quiz=false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Problems: &lt;br /&gt;
* 1. There is no way to change the role of the user, once the user has been added to the assignment as a participant. (Submit button now resolves this issue.)&lt;br /&gt;
* 2. Instructor is not given any confirmation that the role of the participant has been reverted to the original value once he/she navigates somewhere else. This is misleading for an instructor as the he/she might be under the impression that the changes he/she made have been saved. (Flash message now lets the user know about the change.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Snapshots depicting the issue===&lt;br /&gt;
&lt;br /&gt;
* As an Instructor, go to Manage Assignments&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot ManageAssignments.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click on add participant &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot AssignmentParticipants copy.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note that the user on the first record is currently a &amp;quot;Reader&amp;quot; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Currently Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Change the role of the &amp;quot;Reader&amp;quot; to say &amp;quot;Submitter&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submitter.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Refresh or re-navigate to this page and note that the changes are reverted&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot back to Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
&lt;br /&gt;
Changes are made in the partial for participants &amp;quot;_participant.rb&amp;quot;, so that the submit button is rendered on the view. &lt;br /&gt;
Upon changing the selected value for the user role, 'update_authorizations' method is called from participants controller which passes the participant id as a parameter to the method to change it's role in the database. The selected role is passed as a parameter 'authorization' to the update authorization method that updates the can_submit, can_take_quiz, and can_review flags appropriately for each role as described above for the selected participant id.&lt;br /&gt;
 &lt;br /&gt;
Implementing the above mentioned changes, allows the instructor to change the value of role in the dropdown which retains the corresponding record on tap of the Submit button. We have verified that the changes in the above mentioned flags are reflected in the database. The instructor will be presented with a success message on changing the role of the selected participant, on clicking submit. The instructor can revisit the page and expect the updated value to be retained. Both the problems listed above are taken care of such as the instructor is facilitated with an option to change the participant, as well as knows that the change made will be durable.&lt;br /&gt;
&lt;br /&gt;
===Snapshots after the changes===&lt;br /&gt;
&lt;br /&gt;
* Submit button has been added to each row of assignment participants&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submit Added 1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Change the &amp;quot;Reader&amp;quot; to &amp;quot;Submitter&amp;quot;, on the first record and click on submit. Changes have been persisted. Flash message confirmation is also provided to the Instructor to let him/her know of the change.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot submitter saved 2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Additional Changes===&lt;br /&gt;
&amp;lt;i&amp;gt;(These changes were not part of the assigned issue E1963, these are additional issues that we encountered while fixing E1963)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition to the above-mentioned issue, we fixed a few other issues that we observed , which were relevant to Assignment Participant and Course Participant Controllers, namely:&lt;br /&gt;
&lt;br /&gt;
'''1. Export Details''' in Assignment Participants view: We noticed that a a blank csv file was getting generated on exporting detail button in Manage Assignments. We discovered that the reason for this issue is that in the import method, the model defined was that of AssignmentParticipant whereas all the parsing methods for export were present in Assignment model. We did the required changes, tested the functionality and note that this is working fine now.&lt;br /&gt;
The changes for this are made in the common module - export_file_controller.rb following which the export and export_details methods are now called from the assignment.rb as opposed to assignment_participant.rb where there are no export methods and their corresponding implementations.&lt;br /&gt;
Now, the Export Detail button generates a comma-seperated file with the following headers:&lt;br /&gt;
* Assignment Name&lt;br /&gt;
* Assignment Instructor&lt;br /&gt;
* Team ID / Author ID	&lt;br /&gt;
* Reviewee (Team / Student Name)&lt;br /&gt;
* Reviewer&lt;br /&gt;
* Question / Criterion&lt;br /&gt;
* Question ID&lt;br /&gt;
* Answer / Comment ID&lt;br /&gt;
* Answer / Comment&lt;br /&gt;
* Score&lt;br /&gt;
&lt;br /&gt;
'''2. ''' Along with the previous issue, we found that since the partials were shared among Assignment Participant and Course Participant, Course Participant also had the Export Details section and the corresponding button. However, it is not required and we believe that it should be removed from the view. We consulted Dr. Gehringer and based on his feedback as well, we removed the semi-view consisting of &amp;quot;Export Details&amp;quot; from Course Participant. The changes are made in the file &amp;quot;start.html.erb&amp;quot; by using conditional rendering of the partial based on the model name.&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Remove Export Detauls.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Remove Export Details.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. Missing Handle: Assignment Participant''' on adding a new Assignment Participant: We observed that when a new assignment participant is created, if a user already exists with the username, the existing user is added to that Assignment and his existing handle attribute in Users table is mapped to the handle attribute in Participants table. However, if a new user is added not currently in the Users table, a new entry is created first in the Users table and is then replicated in the Participants table. Although, we noticed that the handle attribute in Participants table was coming as null. We fixed this issue by making change in the define_attributes method in ImportFileHelper.rb.&lt;br /&gt;
&lt;br /&gt;
'''4. Import Assignment Participants''' was not working - It is expected that if a user does not exist in the system, on importing assignment participants, a user will be created and he/she will be added to the assignment as a participant. With the current implementation, the user was getting created, however corresponding AssignmentParticipant was not getting created due to a validation with respect to handle. We have fixed this issue by setting the handle in AssignmentParticipants to be the same as the name of the user created (in accordance with the current functionality - when a user is added as an AssignmentParticipant from the UI). This facilitates us to import AssignmentParticipants. &lt;br /&gt;
The mandatory minimal attributes required to import an assignment participant are :&lt;br /&gt;
* Username&lt;br /&gt;
* Full name&lt;br /&gt;
* Email id &lt;br /&gt;
* Password.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. The role in the Assignment Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''6. The role in the Course Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[File:Screen Shot Before Participant CP.png]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant Role CP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
Rspec test has been added to check the update authorizations functionality in the participants_controller_spec.rb. The test verifies the change of flags mentioned above as per the authorization of the user. The tests also checks whether the expected flash message is visible on the UI. Code coverage is 100% for all the code that we have added in the controllers, as part of this project. We checked the code coverage using Ruby Code Coverage plugin and SimpleCov gem. Please see the coverage of the code as shown in the screenshot below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot code coverage.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Team===&lt;br /&gt;
#Natansh Negi (nnegi2@ncsu.edu)&lt;br /&gt;
#Richa Dua (rdua2@ncsu.edu)&lt;br /&gt;
#Roshani Narasimhan (rnarasi2@ncsu.edu)&lt;br /&gt;
'''Mentor:''' Sharique Khan (mkhan8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to expertiza]&lt;br /&gt;
* [https://github.com/RoshaniN/expertiza-team-622.git Link to changes E1963]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1533 Link to Pull request]&lt;br /&gt;
* [http://152.46.19.56:8080/ Link to deployed application on VCL]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127389</id>
		<title>CSC/ECE 517 Fall 2019 - E1963. Changing assignment participant role</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127389"/>
		<updated>2019-11-06T21:09:20Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E1963 Changing assignment Participant role=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
 &lt;br /&gt;
* E1963 This project aims to enable the instructor to change the role of an assignment participant. There are two ways to add a new assignment participant, first being through the Add button on the assignment participant page. Another way is to import via a spreadsheet with the list of users that are to be added. The motivation of E1963 was to enable the instructors adding these users using either of the methods mentioned above to change these users' role. A user can have one of the following roles - participant, reader, reviewer, submitter.&lt;br /&gt;
&lt;br /&gt;
* The existing UI had the a dropdown that displayed the role of the user, we have added a Submit button below each dropdown to enable the instructor to change the role of the user. On clicking the submit button, the role associated with that user is changed in the persistent storage. We have also added a flash message which confirms the change to the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following issues were targeted in this project:&lt;br /&gt;
* '''#1:'''  The instructor does not have the option to change the role of the user, once he/she has been added to the assignment. Thus, if the instructor wishes to change the role of a user from say a reviewer to a submitter, he/she is not able to save the changes.&lt;br /&gt;
* '''#2:''' With the changes made for the issue mentioned above, the instructor will be able to save the changes manually. We would like to maintain the same behavior when the assignment participants are imported from excel. Upon creating a new user using an Excel import, the user should have the role of a participant by default. An instructor was then unable to change the role of the assignment participant.&lt;br /&gt;
&lt;br /&gt;
===Navigation===&lt;br /&gt;
 Manage Assignments -&amp;gt; Add new participant &lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
For each of the assignment participant record, there is a dropdown which contains the role of the participant. When the instructor attempts to change the value in the dropdown, it is not reflected in the backend, as there is no call associated with it, to submit the changes. Thus when the user revisits the page, the changes would he would have made are not retained. &lt;br /&gt;
&lt;br /&gt;
Authorization of the user is based on the flags can_submit, can_review and can_take_quiz flags, which are set to be true or false based on the role of the user. By default, the user is assigned the role of a participant in any assignment. Thus, the goal is to modify these flags and save them in the database when the role of the assignment participant is changed, so that it is a persistent change.&lt;br /&gt;
Authorization of the users based on the flags can be deduced as follows:&lt;br /&gt;
* Participant has can_submit=true, can_review=true and can_take_quiz=true&lt;br /&gt;
* Reader has can_submit= false, can_review=true and can_take_quiz= true&lt;br /&gt;
* Submitter has can_submit=true, can_review= false and can_take_quiz=false&lt;br /&gt;
* Reviewer has can_submit=false, can_review= true and can_take_quiz=false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Problems: &lt;br /&gt;
* 1. There is no way to change the role of the user, once the user has been added to the assignment as a participant. (Submit button now resolves this issue.)&lt;br /&gt;
* 2. Instructor is not given any confirmation that the role of the participant has been reverted to the original value once he/she navigates somewhere else. This is misleading for an instructor as the he/she might be under the impression that the changes he/she made have been saved. (Flash message now lets the user know about the change.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Snapshots depicting the issue===&lt;br /&gt;
&lt;br /&gt;
* As an Instructor, go to Manage Assignments&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot ManageAssignments.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click on add participant &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot AssignmentParticipants copy.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note that the user on the first record is currently a &amp;quot;Reader&amp;quot; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Currently Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Change the role of the &amp;quot;Reader&amp;quot; to say &amp;quot;Submitter&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submitter.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Refresh or re-navigate to this page and note that the changes are reverted&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot back to Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
&lt;br /&gt;
Changes are made in the partial for participants &amp;quot;_participant.rb&amp;quot;, so that the submit button is rendered on the view. &lt;br /&gt;
Upon changing the selected value for the user role, 'update_authorizations' method is called from participants controller which passes the participant id as a parameter to the method to change it's role in the database. The selected role is passed as a parameter 'authorization' to the update authorization method that updates the can_submit, can_take_quiz, and can_review flags appropriately for each role as described above for the selected participant id.&lt;br /&gt;
 &lt;br /&gt;
Implementing the above mentioned changes, allows the instructor to change the value of role in the dropdown which retains the corresponding record on tap of the Submit button. We have verified that the changes in the above mentioned flags are reflected in the database. The instructor will be presented with a success message on changing the role of the selected participant, on clicking submit. The instructor can revisit the page and expect the updated value to be retained. Both the problems listed above are taken care of such as the instructor is facilitated with an option to change the participant, as well as knows that the change made will be durable.&lt;br /&gt;
&lt;br /&gt;
===Snapshots after the changes===&lt;br /&gt;
&lt;br /&gt;
* Submit button has been added to each row of assignment participants&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submit Added 1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Change the &amp;quot;Reader&amp;quot; to &amp;quot;Submitter&amp;quot;, on the first record and click on submit. Changes have been persisted. Flash message confirmation is also provided to the Instructor to let him/her know of the change.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot submitter saved 2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Additional Changes===&lt;br /&gt;
&amp;lt;i&amp;gt;(These changes were not part of the assigned issue E1963, these are additional issues that we encountered while fixing E1963)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition to the above-mentioned issue, we fixed a few other issues that we encountered , which were relevant to Assignment Participant and Course Participant Controllers, namely:&lt;br /&gt;
&lt;br /&gt;
'''1. Export Details''' in Assignment Participants view: We noticed that a a blank csv file was getting generated on exporting detail button in Manage Assignments. We discovered that the reason for this issue is that in the import method, the model defined was that of AssignmentParticipant whereas all the parsing methods for export were present in Assignment model. We did the required changes, tested the functionality and note that this is working fine now.&lt;br /&gt;
The changes for this are made in the common module - export_file_controller.rb following which the export and export_details methods are now called from the assignment.rb as opposed to assignment_participant.rb where there are no export methods and their corresponding implementations.&lt;br /&gt;
Now, the Export Detail button generates a comma-seperated file with the following headers:&lt;br /&gt;
* Assignment Name&lt;br /&gt;
* Assignment Instructor&lt;br /&gt;
* Team ID / Author ID	&lt;br /&gt;
* Reviewee (Team / Student Name)&lt;br /&gt;
* Reviewer&lt;br /&gt;
* Question / Criterion&lt;br /&gt;
* Question ID&lt;br /&gt;
* Answer / Comment ID&lt;br /&gt;
* Answer / Comment&lt;br /&gt;
* Score&lt;br /&gt;
&lt;br /&gt;
'''2. ''' Along with the previous issue, we found that since the partials were shared among Assignment Participant and Course Participant, Course Participant also had the Export Details section and the corresponding button. However, it is not required and we believe that it should be removed from the view. We consulted Dr. Gehringer and based on his feedback as well, we removed the semi-view consisting of &amp;quot;Export Details&amp;quot; from Course Participant. The changes are made in the file &amp;quot;start.html.erb&amp;quot; by using conditional rendering of the partial based on the model name.&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Remove Export Detauls.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Remove Export Details.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. Missing Handle: Assignment Participant''' on adding a new Assignment Participant: We observed that when a new assignment participant is created, if a user already exists with the username, the existing user is added to that Assignment and his existing handle attribute in Users table is mapped to the handle attribute in Participants table. However, if a new user is added not currently in the Users table, a new entry is created first in the Users table and is then replicated in the Participants table. Although, we noticed that the handle attribute in Participants table was coming as null. We fixed this issue by making change in the define_attributes method in ImportFileHelper.rb.&lt;br /&gt;
&lt;br /&gt;
'''4. Import Assignment Participants''' was not working - It is expected that if a user does not exist in the system, on importing assignment participants, a user will be created and he/she will be added to the assignment as a participant. With the current implementation, the user was getting created, however corresponding AssignmentParticipant was not getting created due to a validation with respect to handle. We have fixed this issue by setting the handle in AssignmentParticipants to be the same as the name of the user created (in accordance with the current functionality - when a user is added as an AssignmentParticipant from the UI). This facilitates us to import AssignmentParticipants. &lt;br /&gt;
The mandatory minimal attributes required to import an assignment participant are :&lt;br /&gt;
* Username&lt;br /&gt;
* Full name&lt;br /&gt;
* Email id &lt;br /&gt;
* Password.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. The role in the Assignment Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''6. The role in the Course Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[File:Screen Shot Before Participant CP.png]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant Role CP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
Rspec test has been added to check the update authorizations functionality in the participants_controller_spec.rb. The test verifies the change of flags mentioned above as per the authorization of the user. The tests also checks whether the expected flash message is visible on the UI. Code coverage is 100% for all the code that we have added in the controllers, as part of this project. We checked the code coverage using Ruby Code Coverage plugin and SimpleCov gem. Please see the coverage of the code as shown in the screenshot below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot code coverage.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Team===&lt;br /&gt;
#Natansh Negi (nnegi2@ncsu.edu)&lt;br /&gt;
#Richa Dua (rdua2@ncsu.edu)&lt;br /&gt;
#Roshani Narasimhan (rnarasi2@ncsu.edu)&lt;br /&gt;
'''Mentor:''' Sharique Khan (mkhan8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to expertiza]&lt;br /&gt;
* [https://github.com/RoshaniN/expertiza-team-622.git Link to changes E1963]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1533 Link to Pull request]&lt;br /&gt;
* [http://152.46.19.56:8080/ Link to deployed application on VCL]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127387</id>
		<title>CSC/ECE 517 Fall 2019 - E1963. Changing assignment participant role</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127387"/>
		<updated>2019-11-06T21:07:21Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E1963 Changing assignment Participant role=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
 &lt;br /&gt;
* E1963 This project aims to enable the instructor to change the role of an assignment participant. There are two ways to add a new assignment participant, first being through the Add button on the assignment participant page. Another way is to import via a spreadsheet with the list of users that are to be added. The motivation of E1963 was to enable the instructors adding these users using either of the methods mentioned above to change these users' role. A user can have one of the following roles - participant, reader, reviewer, submitter.&lt;br /&gt;
&lt;br /&gt;
* The existing UI had the a dropdown that displayed the role of the user, we have added a Submit button below each dropdown to enable the instructor to change the role of the user. On tapping the submit button, the role associated with that user is changed in the persistent storage. We have also added a flash message which confirms the change to the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following issues were targeted in this project:&lt;br /&gt;
* '''#1:'''  The instructor does not have the option to change the role of the user, once he/she has been added to the assignment. Thus, if the instructor wishes to change the role of a user from say a reviewer to a submitter, he/she is not able to save the changes.&lt;br /&gt;
* '''#2:''' With the changes made for the issue mentioned above, the instructor will be able to save the changes manually. We would like to maintain the same behavior when the assignment participants are imported from excel. Upon creating a new user using an Excel import, the user should have the role of a participant by default. An instructor was then unable to change the role of the assignment participant.&lt;br /&gt;
&lt;br /&gt;
===Navigation===&lt;br /&gt;
 Manage Assignments -&amp;gt; Add new participant &lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
For each of the assignment participant record, there is a dropdown which contains the role of the participant. When the instructor attempts to change the value in the dropdown, it is not reflected in the backend, as there is no call associated with it, to submit the changes. Thus when the user revisits the page, the changes would he would have made are not retained. &lt;br /&gt;
&lt;br /&gt;
Authorization of the user is based on the flags can_submit, can_review and can_take_quiz flags, which are set to be true or false based on the role of the user. By default, the user is assigned the role of a participant in any assignment. Thus, the goal is to modify these flags and save them in the database when the role of the assignment participant is changed, so that it is a persistent change.&lt;br /&gt;
Authorization of the users based on the flags can be deduced as follows:&lt;br /&gt;
* Participant has can_submit=true, can_review=true and can_take_quiz=true&lt;br /&gt;
* Reader has can_submit= false, can_review=true and can_take_quiz= true&lt;br /&gt;
* Submitter has can_submit=true, can_review= false and can_take_quiz=false&lt;br /&gt;
* Reviewer has can_submit=false, can_review= true and can_take_quiz=false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Problems: &lt;br /&gt;
* 1. There is no way to change the role of the user, once the user has been added to the assignment as a participant. (Submit button now resolves this issue.)&lt;br /&gt;
* 2. Instructor is not given any confirmation that the role of the participant has been reverted to the original value once he/she navigates somewhere else. This is misleading for an instructor as the he/she might be under the impression that the changes he/she made have been saved. (Flash message now lets the user know about the change.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Snapshots depicting the issue===&lt;br /&gt;
&lt;br /&gt;
* As an Instructor, go to Manage Assignments&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot ManageAssignments.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click on add participant &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot AssignmentParticipants copy.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note that the user on the first record is currently a &amp;quot;Reader&amp;quot; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Currently Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Change the role of the &amp;quot;Reader&amp;quot; to say &amp;quot;Submitter&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submitter.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Refresh or re-navigate to this page and note that the changes are reverted&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot back to Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
&lt;br /&gt;
Changes are made in the partial for participants &amp;quot;_participant.rb&amp;quot;, so that the submit button is rendered on the view. &lt;br /&gt;
Upon changing the selected value for the user role, 'update_authorizations' method is called from participants controller which passes the participant id as a parameter to the method to change it's role in the database. The selected role is passed as a parameter 'authorization' to the update authorization method that updates the can_submit, can_take_quiz, and can_review flags appropriately for each role as described above for the selected participant id.&lt;br /&gt;
 &lt;br /&gt;
Implementing the above mentioned changes, allows the instructor to change the value of role in the dropdown which retains the corresponding record on tap of the Submit button. We have verified that the changes in the above mentioned flags are reflected in the database. The instructor will be presented with a success message on changing the role of the selected participant, on clicking submit. The instructor can revisit the page and expect the updated value to be retained. Both the problems listed above are taken care of such as the instructor is facilitated with an option to change the participant, as well as knows that the change made will be durable.&lt;br /&gt;
&lt;br /&gt;
===Snapshots after the changes===&lt;br /&gt;
&lt;br /&gt;
* Submit button has been added to each row of assignment participants&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submit Added 1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Change the &amp;quot;Reader&amp;quot; to &amp;quot;Submitter&amp;quot;, on the first record and click on submit. Changes have been persisted. Flash message confirmation is also provided to the Instructor to let him/her know of the change.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot submitter saved 2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Additional Changes===&lt;br /&gt;
&amp;lt;i&amp;gt;(These changes were not part of the assigned issue E1963, these are additional issues that we encountered while fixing E1963)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition to the above-mentioned issue, we fixed a few other issues that we encountered , which were relevant to Assignment Participant and Course Participant Controllers, namely:&lt;br /&gt;
&lt;br /&gt;
'''1. Export Details''' in Assignment Participants view: We noticed that a a blank csv file was getting generated on exporting detail button in Manage Assignments. We discovered that the reason for this issue is that in the import method, the model defined was that of AssignmentParticipant whereas all the parsing methods for export were present in Assignment model. We did the required changes, tested the functionality and note that this is working fine now.&lt;br /&gt;
The changes for this are made in the common module - export_file_controller.rb following which the export and export_details methods are now called from the assignment.rb as opposed to assignment_participant.rb where there are no export methods and their corresponding implementations.&lt;br /&gt;
Now, the Export Detail button generates a comma-seperated file with the following headers:&lt;br /&gt;
* Assignment Name&lt;br /&gt;
* Assignment Instructor&lt;br /&gt;
* Team ID / Author ID	&lt;br /&gt;
* Reviewee (Team / Student Name)&lt;br /&gt;
* Reviewer&lt;br /&gt;
* Question / Criterion&lt;br /&gt;
* Question ID&lt;br /&gt;
* Answer / Comment ID&lt;br /&gt;
* Answer / Comment&lt;br /&gt;
* Score&lt;br /&gt;
&lt;br /&gt;
'''2. ''' Along with the previous issue, we found that since the partials were shared among Assignment Participant and Course Participant, Course Participant also had the Export Details section and the corresponding button. However, it is not required and we believe that it should be removed from the view. We consulted Dr. Gehringer and based on his feedback as well, we removed the semi-view consisting of &amp;quot;Export Details&amp;quot; from Course Participant. The changes are made in the file &amp;quot;start.html.erb&amp;quot; by using conditional rendering of the partial based on the model name.&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Remove Export Detauls.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Remove Export Details.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. Missing Handle: Assignment Participant''' on adding a new Assignment Participant: We observed that when a new assignment participant is created, if a user already exists with the username, the existing user is added to that Assignment and his existing handle attribute in Users table is mapped to the handle attribute in Participants table. However, if a new user is added not currently in the Users table, a new entry is created first in the Users table and is then replicated in the Participants table. Although, we noticed that the handle attribute in Participants table was coming as null. We fixed this issue by making change in the define_attributes method in ImportFileHelper.rb.&lt;br /&gt;
&lt;br /&gt;
'''4. Import Assignment Participants''' was not working - It is expected that if a user does not exist in the system, on importing assignment participants, a user will be created and he/she will be added to the assignment as a participant. With the current implementation, the user was getting created, however corresponding AssignmentParticipant was not getting created due to a validation with respect to handle. We have fixed this issue by setting the handle in AssignmentParticipants to be the same as the name of the user created (in accordance with the current functionality - when a user is added as an AssignmentParticipant from the UI). This facilitates us to import AssignmentParticipants. &lt;br /&gt;
The mandatory minimal attributes required to import an assignment participant are :&lt;br /&gt;
* Username&lt;br /&gt;
* Full name&lt;br /&gt;
* Email id &lt;br /&gt;
* Password.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. The role in the Assignment Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''6. The role in the Course Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[File:Screen Shot Before Participant CP.png]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant Role CP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
Rspec test has been added to check the update authorizations functionality in the participants_controller_spec.rb. The test verifies the change of flags mentioned above as per the authorization of the user. The tests also checks whether the expected flash message is visible on the UI. Code coverage is 100% for all the code that we have added in the controllers, as part of this project. We checked the code coverage using Ruby Code Coverage plugin and SimpleCov gem. Please see the coverage of the code as shown in the screenshot below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot code coverage.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Team===&lt;br /&gt;
#Natansh Negi (nnegi2@ncsu.edu)&lt;br /&gt;
#Richa Dua (rdua2@ncsu.edu)&lt;br /&gt;
#Roshani Narasimhan (rnarasi2@ncsu.edu)&lt;br /&gt;
'''Mentor:''' Sharique Khan (mkhan8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to expertiza]&lt;br /&gt;
* [https://github.com/RoshaniN/expertiza-team-622.git Link to changes E1963]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1533 Link to Pull request]&lt;br /&gt;
* [http://152.46.19.56:8080/ Link to deployed application on VCL]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127386</id>
		<title>CSC/ECE 517 Fall 2019 - E1963. Changing assignment participant role</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1963._Changing_assignment_participant_role&amp;diff=127386"/>
		<updated>2019-11-06T21:05:40Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E1963 Changing assignment Participant role=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
 &lt;br /&gt;
* E1963 This project aims to enable the instructor to change the role of an assignment participant. There are two ways to add a new assignment participant, first being through the Add button on the assignment participant page. Another way is to import via a spreadsheet with the list of users that are to be added. The motivation of E1963 was to enable the instructors adding these users using either of the methods mentioned above to change these users' role. A user can have one of the following roles - participant, reader, reviewer, submitter.&lt;br /&gt;
&lt;br /&gt;
* The existing UI had the a dropdown that displayed the role of the user, we have added a Submit button below each dropdown to enable the instructor to change the role of the user. On tapping the submit button, the role associated with that user is changed in the persistent storage. We have also added a flash message which confirms the change to the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following issues were targeted in this project:&lt;br /&gt;
* '''#1:'''  The instructor does not have the option to change the role of the user, once he/she has been added to the assignment. Thus, if the instructor wishes to change the role of a user from say a reviewer to a submitter, he/she is not able to save the changes.&lt;br /&gt;
* '''#2:''' With the changes made for the issue mentioned above, the instructor will be able to save the changes manually. We would like to maintain the same behavior when the assignment participants are imported from excel. Upon creating a new user using an Excel import, the user should have the role of a participant by default. An instructor was then unable to change the role of the assignment participant.&lt;br /&gt;
&lt;br /&gt;
===Navigation===&lt;br /&gt;
 Manage Assignments -&amp;gt; Add new participant &lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
For each of the assignment participant record, there is a dropdown which contains the role of the participant. When the instructor attempts to change the value in the dropdown, it is not reflected in the backend, as there is no call associated with it, to submit the changes. Thus when the user revisits the page, the changes would he would have made are not retained. &lt;br /&gt;
&lt;br /&gt;
Authorization of the user is based on the flags can_submit, can_review and can_take_quiz flags, which are set to be true or false based on the role of the user. By default, the user is assigned the role of a participant in any assignment. Thus, the goal is to modify these flags and save them in the database when the role of the assignment participant is changed, so that it is a persistent change.&lt;br /&gt;
Authorization of the users based on the flags can be deduced as follows:&lt;br /&gt;
* Participant has can_submit=true, can_review=true and can_take_quiz=true&lt;br /&gt;
* Reader has can_submit= false, can_review=true and can_take_quiz= true&lt;br /&gt;
* Submitter has can_submit=true, can_review= false and can_take_quiz=false&lt;br /&gt;
* Reviewer has can_submit=false, can_review= true and can_take_quiz=false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Problems: &lt;br /&gt;
* 1. There is no way to change the role of the user, once the user has been added to the assignment as a participant. (Submit button now resolves this issue.)&lt;br /&gt;
* 2. Instructor is not given any confirmation that the role of the participant has been reverted to the original value once he/she navigates somewhere else. This is misleading for an instructor as the he/she might be under the impression that the changes he/she made have been saved. (Flash message now lets the user know about the change.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Snapshots depicting the issue===&lt;br /&gt;
&lt;br /&gt;
* As an Instructor, go to Manage Assignments&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot ManageAssignments.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click on add participant &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot AssignmentParticipants copy.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Note that the user on the first record is currently a &amp;quot;Reader&amp;quot; &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Currently Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Change the role of the &amp;quot;Reader&amp;quot; to say &amp;quot;Submitter&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submitter.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Refresh or re-navigate to this page and note that the changes are reverted&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot back to Reader.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
&lt;br /&gt;
Changes are made in the partial for participants &amp;quot;_participant.rb&amp;quot;, so that the submit button is rendered on the view. &lt;br /&gt;
Upon changing the selected value for the user role, 'update_authorizations' method is called from participants controller which passes the participant id as a parameter to the method to change it's role in the database. The selected role is passed as a parameter 'authorization' to the update authorization method that updates the can_submit, can_take_quiz, and can_review flags appropriately for each role as described above for the selected participant id.&lt;br /&gt;
 &lt;br /&gt;
Implementing the above mentioned changes, allows the instructor to change the value of role in the dropdown which retains the corresponding record on tap of the Submit button. We have verified that the changes in the above mentioned flags are reflected in the database. The instructor will be presented with a success message on changing the role of the selected participant, on clicking submit. The instructor can revisit the page and expect the updated value to be retained. Both the problems listed above are taken care of such as the instructor is facilitated with an option to change the participant, as well as knows that the change made will be durable.&lt;br /&gt;
&lt;br /&gt;
===Snapshots after the changes===&lt;br /&gt;
&lt;br /&gt;
* Submit button has been added to each row of assignment participants&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot Submit Added 1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Change the &amp;quot;Reader&amp;quot; to &amp;quot;Submitter&amp;quot;, on the first record and click on submit. Changes have been persisted. Flash message confirmation is also provided to the Instructor to let him/her know of the change.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screenshot submitter saved 2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Additional Changes===&lt;br /&gt;
&amp;lt;i&amp;gt;(These changes were not part of the assigned issue E1963, these are additional issues that we encountered while fixing E1963)&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition to the above-mentioned issue, we fixed a few other issues that we encountered , which were relevant to Assignment Participant and Course Participant Controllers, namely:&lt;br /&gt;
&lt;br /&gt;
'''1. Export Details''' in Assignment Participants view: We noticed that a a blank csv file was getting generated on exporting detail button in Manage Assignments. We discovered that the reason for this issue is that in the import method, the model defined was that of AssignmentParticipant whereas all the parsing methods for export were present in Assignment model. We did the required changes, tested the functionality and note that this is working fine now.&lt;br /&gt;
The changes for this are made in the common module - export_file_controller.rb following which the export and export_details methods are now called from the assignment.rb as opposed to assignment_participant.rb where there are no export methods and their corresponding implementations.&lt;br /&gt;
Now, the Export Detail button generates a comma-seperated file with the following headers:&lt;br /&gt;
* Assignment Name&lt;br /&gt;
* Assignment Instructor&lt;br /&gt;
* Team ID / Author ID	&lt;br /&gt;
* Reviewee (Team / Student Name)&lt;br /&gt;
* Reviewer&lt;br /&gt;
* Question / Criterion&lt;br /&gt;
* Question ID&lt;br /&gt;
* Answer / Comment ID&lt;br /&gt;
* Answer / Comment&lt;br /&gt;
* Score&lt;br /&gt;
&lt;br /&gt;
'''2. ''' Along with the previous issue, we found that since the partials were shared among Assignment Participant and Course Participant, Course Participant also had the Export Details section and the corresponding button. However, it is not required and we believe that it should be removed from the view. We consulted Dr. Gehringer and based on his feedback as well, we removed the semi-view consisting of &amp;quot;Export Details&amp;quot; from Course Participant. The changes are made in the file &amp;quot;start.html.erb&amp;quot; by using conditional rendering of the partial based on the model name.&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Remove Export Detauls.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Remove Export Details.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. Missing Handle: Assignment Participant''' on adding a new Assignment Participant: We observed that when a new assignment participant is created, if a user already exists with the username, the existing user is added to that Assignment and his existing handle attribute in Users table is mapped to the handle attribute in Participants table. However, if a new user is added not currently in the Users table, a new entry is created first in the Users table and is then replicated in the Participants table. Although, we noticed that the handle attribute in Participants table was coming as null. We fixed this issue by making change in the define_attributes method in ImportFileHelper.rb.&lt;br /&gt;
&lt;br /&gt;
'''4. Import Assignment Participants''' was not working - It is expected that if a user does not exist in the system, on importing assignment participants, a user will be created and he/she will be added to the assignment as a participant. With the current implementation, the user was getting created, however corresponding AssignmentParticipant was not getting created due to a validation with respect to handle. We have fixed this issue by setting the handle in AssignmentParticipants to be the same as the name of the user created (in accordance with the current functionality - when a user is added as an AssignmentParticipant from the UI). This facilitates us to import AssignmentParticipants. &lt;br /&gt;
The mandatory minimal attributes required to import an assignment participant are :&lt;br /&gt;
* Username&lt;br /&gt;
* Full name&lt;br /&gt;
* Email id &lt;br /&gt;
* Password.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. The role in the Assignment Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot Before Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant AP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''6. The role in the Course Participant view''' doesn't have a header unlike all the other attributes on the view. We added a header for the role, thereby increasing the readability and consistency on the UI. The required changes are made in the partial &amp;quot;_user_list.html&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The view before change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[File:Screen Shot Before Participant CP.png]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The view after change:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot After Participant Role CP.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
Rspec test has been added to check the update authorizations functionality in the participants_controller_spec.rb. The test verifies the change of flags mentioned above as per the authorization of the user. The tests also checks whether the expected flash message is visible on the UI. Code coverage is 100% for all the code that we have added as part of this project. We checked the code coverage using Ruby Code Coverage plugin and SimpleCov gem.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Screen Shot code coverage.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Team===&lt;br /&gt;
#Natansh Negi (nnegi2@ncsu.edu)&lt;br /&gt;
#Richa Dua (rdua2@ncsu.edu)&lt;br /&gt;
#Roshani Narasimhan (rnarasi2@ncsu.edu)&lt;br /&gt;
'''Mentor:''' Sharique Khan (mkhan8@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
* [https://github.com/expertiza/expertiza Link to expertiza]&lt;br /&gt;
* [https://github.com/RoshaniN/expertiza-team-622.git Link to changes E1963]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1533 Link to Pull request]&lt;br /&gt;
* [http://152.46.19.56:8080/ Link to deployed application on VCL]&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Screen_Shot_code_coverage.png&amp;diff=127384</id>
		<title>File:Screen Shot code coverage.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Screen_Shot_code_coverage.png&amp;diff=127384"/>
		<updated>2019-11-06T21:04:05Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Screen_Shot_After_Remove_Export_Details.png&amp;diff=127383</id>
		<title>File:Screen Shot After Remove Export Details.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Screen_Shot_After_Remove_Export_Details.png&amp;diff=127383"/>
		<updated>2019-11-06T21:03:56Z</updated>

		<summary type="html">&lt;p&gt;Rnarasi2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rnarasi2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Screen_Shot_Before_Remove_Export_Detauls.png&amp;diff=127382</id>
		<title>File:Screen Shot Before Remove Export Detauls.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Screen_Shot_Before_Remove_Export_Detauls.png&amp;diff=127382"/>
		<updated>2019-11-06T21:03:36Z</updated>

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