<?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=Asundar2</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=Asundar2"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Asundar2"/>
	<updated>2026-05-20T00:44:01Z</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_2017/E1791._Track_the_time_that_students_look_at_the_other_submissions_-_logging_improvement&amp;diff=114490</id>
		<title>CSC/ECE 517 Fall 2017/E1791. Track the time that students look at the other submissions - logging improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1791._Track_the_time_that_students_look_at_the_other_submissions_-_logging_improvement&amp;diff=114490"/>
		<updated>2017-12-06T04:32:33Z</updated>

		<summary type="html">&lt;p&gt;Asundar2: /* Rspec Test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The expertiza project takes advantage of peer-review among students to allow them to learn from each other. To track the review time that each student spend on each submitted resources is meaningful to instructors to study and improve the teach experience. However, the time tracking of specific content on these resources is not perfect in the expertiza system. The previous team working on E1705 project has solved part of such problems by tracking the active time of windows opened from the submitted links. But for the submitted files which could be downloaded for local review, there is only a rough approximation solution yet. In this project, our team is going to solve this problem as well as improving previous time tracking methods using mature third-party APIs to record link review time more accurately. To accomplish this goal, here are the general solutions we designed and implemented in this project:&lt;br /&gt;
&lt;br /&gt;
*Designed a database schema for logging the time a reviewer spend on a submission;&lt;br /&gt;
*Designed and implemented dynamic partial components using Javascript and Ruby to open students’ submissions in new windows to view online;&lt;br /&gt;
*Used DOM to control the windows holding review submission files or links, and record the open and close time;&lt;br /&gt;
*Modify Review report (views/review_mapping/_review_report.html.erb) to show the total and detailed time spent on each review submissions with visualization.&lt;br /&gt;
&lt;br /&gt;
== Problem Description and Solution ==&lt;br /&gt;
Our team is going to solve the submission review time tracking by attempting to open the downloaded files inside popup windows of the web browser in order to record the time on the client side. &lt;br /&gt;
&lt;br /&gt;
=== Design pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Type of submitted files ===&lt;br /&gt;
For most of our tasks, there are two types of submitted files. &lt;br /&gt;
&lt;br /&gt;
1. One kind is online links, such as github repo or pull request link, youtube video link, expertiza wiki page link, etc&lt;br /&gt;
&lt;br /&gt;
2. The other one includes files such as pdf, txt, doc, images, etc and other download contents.&lt;br /&gt;
&lt;br /&gt;
=== Database shcema design ===&lt;br /&gt;
For this project, we need to design a database table to store all the time that we need to record for each review submission. We would like to name the table as '''review_time'''. For the table, we would use '''map_id''' in table response, which uses '''response_map_id''' as the primary information. Then we need to record '''reviewer_id''' and '''reviewee_id''', '''file_link''' for submitted files, as well as time '''start_at''' and '''end_at''', then store them in the table.&lt;br /&gt;
&lt;br /&gt;
[[File:E1791db.png | center]]&lt;br /&gt;
&lt;br /&gt;
=== Time tracking mechanism ===&lt;br /&gt;
&lt;br /&gt;
For each review, when the reviewer click on one link of the submitted files, we create an entry to the table review_time, we will write a function to record current time to the database. &lt;br /&gt;
&lt;br /&gt;
For how to determine time when the reviewer complete with the opened link, there are different cases. If the reviewer click on save or submit button, close the page, or logout, we need to write to all open entry (without end_at) respect to this review and save current time to end_at. But for how to decide when the review close the opened link is a little complicated. For github and youtube links and txt, pdf, doc, image files, we will open submitted files in views/response/_submitted_files.html.erb so that when the user click on the link, it opens a popup window that shows the submission, record time when it opens and closes. This is done by controlling DOM using jQuery javascript library, and then send back the time records through Ajax. For the other files that need to be downloaded, we can only make an approximation by record the time when the reviewer click on the link until the time he/she enter the reviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:E1791_flowchart.png | center]]&lt;br /&gt;
&lt;br /&gt;
=== View modification ===&lt;br /&gt;
After we record start_at and end_at time for each piece of review, we need to display time that each reviewer spent for each link. Because the reviewer may save the review and start again in the future, so for each link there might be several entries, we need to sum them together. We will try to modify code in review_mapping/_review_report.html.erb first to modify the view. This framework follows well the &amp;quot;open to extension and close to modification&amp;quot; principle, which makes further changes more feasible by adding additional view components without affecting current functions.&lt;br /&gt;
[[File:review_piechart.png | center]]&lt;br /&gt;
&lt;br /&gt;
=== Edge cases ===&lt;br /&gt;
1. When user click on save or submit the review without closing opened windows, the system will search all records of response time for the reviewer and reviewee where end time is NULL, and update it with current time.&lt;br /&gt;
&lt;br /&gt;
2. If the reviewer opens the reference links or download files, but leave them open and turn to focus other unrelated stuff, the review page will send a popup alert dialog to confirm if the review is still in review mode. If not, it will close these windows and save the time as approximation of end time. Otherwise, it will continue the review process.&lt;br /&gt;
[[File:Alert_popup.png | center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== UI and Manual test ===&lt;br /&gt;
We will test the following cases during our development&lt;br /&gt;
&lt;br /&gt;
1. When we work the review, if we click on GitHub link, GitHub pull request link, check whether the system record review time correctly.&lt;br /&gt;
&lt;br /&gt;
2. When we work the review, if we click on doc, pdf, image link, check whether system open submitted files in views/response/_submitted_files.html.erb and recore the review time correctly.&lt;br /&gt;
&lt;br /&gt;
3. Check if the reviewer save the process and start again with click on same clink, check whether the system will record all the entry, and on the view page take all entries for one link into account.&lt;br /&gt;
&lt;br /&gt;
=== Rspec Test ===&lt;br /&gt;
Test of new model and function will be written and tested during project development:&lt;br /&gt;
* Test the success of a review time record given valid start and end time;&lt;br /&gt;
&lt;br /&gt;
describe ResponseTimesController do&lt;br /&gt;
  describe '#action_allowed?' do&lt;br /&gt;
    it &amp;quot;should return true&amp;quot; do&lt;br /&gt;
      expect(true).to be_truthy&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
* Test whether the start time is updated to the end time last saved in the database when the user resumes a review;&lt;br /&gt;
&lt;br /&gt;
  describe '#response_start_time' do&lt;br /&gt;
    context 'when the link is opened and timed' do&lt;br /&gt;
      it 'should update time record with start time as end time' do&lt;br /&gt;
        response_time_records=double('ResponseTime')&lt;br /&gt;
        allow(ResponseTime).to receive(:where).with([:map_id,:round,:link]).and_return(response_time_records)&lt;br /&gt;
        dummy = double('BasicObject')&lt;br /&gt;
        allow(ResponseTime).to receive(:end_at).and_return(dummy)&lt;br /&gt;
        allow(dummy).to receive(:nil?).and_return(true)&lt;br /&gt;
        allow(ResponseTime).to receive(:update_attributes).with(:end_at,:start_at).and_return(response_time_records)&lt;br /&gt;
        expect(response.body).to be_blank&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
* Test whether the end time is updated as the current time when the review is saved to the database.&lt;br /&gt;
&lt;br /&gt;
 describe '#response_end_time' do&lt;br /&gt;
    context 'when response does not have a end time' do&lt;br /&gt;
      it 'should update time record with end time as current time' do&lt;br /&gt;
        response_time_records=double('ResponseTime')&lt;br /&gt;
        allow(ResponseTime).to receive(:where).with([:map_id,:round,:link]).and_return(response_time_records)&lt;br /&gt;
        dummy = double('BasicObject')&lt;br /&gt;
        allow(ResponseTime).to receive(:end_at).and_return(dummy)&lt;br /&gt;
        allow(dummy).to receive(:nil?).and_return(true)&lt;br /&gt;
        allow(ResponseTime).to receive(:update_attributes).with(:end_at,Time.now.to_date).and_return(response_time_records)&lt;br /&gt;
        expect(response.body).to be_blank&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== Related Files ==&lt;br /&gt;
review_time.rb &amp;lt;br&amp;gt;&lt;br /&gt;
responses_controller.rb &amp;lt;br&amp;gt;&lt;br /&gt;
response_times_controller.rb &amp;lt;br&amp;gt;&lt;br /&gt;
helper/review_mapping_helper.rb &amp;lt;br&amp;gt;&lt;br /&gt;
response/response.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
review_mapping/_review_report.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
review_mapping/_review_submissions_time_spent.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
view/popup/reviewer_details_popup.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
view/submitted_content/_hyperlink.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
view/submitted_content/_submitted_files.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
db/migrate/20171117190721_create_response_times.rb &amp;lt;br&amp;gt;&lt;br /&gt;
config/routes.rb&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
&lt;br /&gt;
In this project, we accomplished the requirement defined in the project instructions. However, due to the complexity of the Expertiza system and limited time period, there are still several points to improve in the future:&lt;br /&gt;
&lt;br /&gt;
1. Improve the accuracy of review time record. To record the exact time that the user spends on each link or file, it is more accurate to track the active time of each new window or tab of these links or online files. We attempted this design using 'window.focus()', but it does not work once the user moved away from the review page and turned to other applications. So either tweaking the web setting or using browser APIs may solve this problem.&lt;br /&gt;
&lt;br /&gt;
2. Notify the user when no response on the review page. Occasionally the user may open the review page to do the review, but is interrupted to focus on other applications. In this case, we stopped the time recording but try to alert the user that if he wants to continue the review. However, this notice cannot show in time if the user is not focusing on that review page. So a global alert is necessary to save the time and provide notice on time.&lt;br /&gt;
&lt;br /&gt;
== Project Links ==&lt;br /&gt;
1. [https://github.com/expertiza/expertiza/pull/1124 Project Github repo]&lt;br /&gt;
&lt;br /&gt;
2. [https://youtu.be/IMTBqiKth-k Project Video Demo]&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
[mailto:sli41@ncsu.edu Shijie Li]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:wsun12@ncsu.edu Wei Sun]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:asundar2@ncsu.edu Aishwarya Sundararajan]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:dbhanda@ncsu.edu Darshan Balakrishna Bhandari]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Asundar2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1791._Track_the_time_that_students_look_at_the_other_submissions_-_logging_improvement&amp;diff=113864</id>
		<title>CSC/ECE 517 Fall 2017/E1791. Track the time that students look at the other submissions - logging improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1791._Track_the_time_that_students_look_at_the_other_submissions_-_logging_improvement&amp;diff=113864"/>
		<updated>2017-11-30T17:47:23Z</updated>

		<summary type="html">&lt;p&gt;Asundar2: /* Rspec Test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The expertiza project takes advantage of peer-review among students to allow them to learn from each other. To track the review time that each student spend on each submitted resources is meaningful to instructors to study and improve the teach experience. However, the time tracking of specific content on these resources is not perfect in the expertiza system. The previous team working on E1705 project has solved part of such problems by tracking the active time of windows opened from the submitted links. But for the submitted files which could be downloaded for local review, there is only a rough approximation solution yet. In this project, our team is going to solve this problem as well as improving previous time tracking methods using mature third-party APIs to record link review time more accurately. To accomplish this goal, here are the tasks needed to be done:&lt;br /&gt;
&lt;br /&gt;
*Design a database schema for logging the time a reviewer spend on a submission;&lt;br /&gt;
*Design and implement a solution that handles the use case, where students’ submissions are hosted on an external website using third-party APIs, e.g. gem: [https://github.com/octokit/octokit.rb Octokit] for Github use case;&lt;br /&gt;
*Modify Review report (views/review_mapping/_review_report.html.erb) to show the time spent on each submission.&lt;br /&gt;
&lt;br /&gt;
== Problem Description ==&lt;br /&gt;
Our team is going to solve the submission review time tracking by attempting to open the downloaded files inside popup windows of the web browser in order to record the time on the client side. &lt;br /&gt;
&lt;br /&gt;
=== Type of submitted files ===&lt;br /&gt;
For most of our tasks, there are two types of submitted files. &lt;br /&gt;
&lt;br /&gt;
1. One kind is online links, such as github repo or pull request link, youtube video link, expertiza wiki page link, etc&lt;br /&gt;
&lt;br /&gt;
2. The other one includes files such as pdf, txt, doc, images, etc and other download contents.&lt;br /&gt;
&lt;br /&gt;
=== Database shcema design ===&lt;br /&gt;
For this project, we need to design a database table to store all the time that we need to record for each review submission. We would like to name the table as '''review_time'''. For the table, we would use '''map_id''' in table response, which uses '''response_map_id''' as the primary information. Then we need to record '''reviewer_id''' and '''reviewee_id''', '''file_link''' for submitted files, as well as time '''start_at''' and '''end_at''', then store them in the table.&lt;br /&gt;
&lt;br /&gt;
[[File:E1791db.png]]&lt;br /&gt;
&lt;br /&gt;
=== Time tracking mechanism ===&lt;br /&gt;
&lt;br /&gt;
[[File:E1791_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
For each review, when the reviewer click on one link of the submitted files, we create an entry to the table review_time, we will write a function to record current time to the database. &lt;br /&gt;
&lt;br /&gt;
For how to determine time when the reviewer complete with the opened link, there are different cases. If the reviewer click on save or submit button, close the page, or logout, we need to write to all open entry (without end_at) respect to this review and save current time to end_at. But for how to decide when the review close the opened link is a little complicated. For github and youtube links and txt, pdf, doc, image files, we will open submitted files in views/response/_submitted_files.html.erb so that when the user click on the link, it opens a popup window that shows the submission, record time when it opens and closes. This is done by controlling DOM using jQuery javascript library, and then send back the time records through Ajax. For the other files that need to be downloaded, we can only make an approximation by record the time when the reviewer click on the link until the time he/she enter the reviews.&lt;br /&gt;
&lt;br /&gt;
=== View modification ===&lt;br /&gt;
After we record start_at and end_at time for each piece of review, we need to display time that each reviewer spent for each link. Because the reviewer may save the review and start again in the future, so for each link there might be several entries, we need to sum them together. We will try to modify code in review_mapping/_review_report.html.erb first to modify the view. This framework follows well the &amp;quot;open to extension and close to modification&amp;quot; principle, which makes further changes more feasible by adding additional view components without affecting current functions.&lt;br /&gt;
&lt;br /&gt;
=== Edge cases ===&lt;br /&gt;
User shuts down browser during review.&amp;lt;br&amp;gt;&lt;br /&gt;
User logs out while review reference windows still open.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== UI and Manual test ===&lt;br /&gt;
We will test the following cases during our development&lt;br /&gt;
&lt;br /&gt;
1. When we work the review, if we click on GitHub link, GitHub pull request link, check whether the system record review time correctly.&lt;br /&gt;
&lt;br /&gt;
2. When we work the review, if we click on doc, pdf, image link, check whether system open submitted files in views/response/_submitted_files.html.erb and recore the review time correctly.&lt;br /&gt;
&lt;br /&gt;
3. Check if the reviewer save the process and start again with click on same clink, check whether the system will record all the entry, and on the view page take all entries for one link into account.&lt;br /&gt;
&lt;br /&gt;
=== Rspec Test ===&lt;br /&gt;
Test of new model and function will be written and tested during project development:&lt;br /&gt;
* Test the success of a review time record given valid start and end time;&lt;br /&gt;
&lt;br /&gt;
describe ResponseTimesController do&lt;br /&gt;
  describe '#action_allowed?' do&lt;br /&gt;
    it &amp;quot;should return true&amp;quot; do&lt;br /&gt;
      expect(true).to be_truthy&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
* Test the error handler when a review time record fails to save;&lt;br /&gt;
* Test the calculation of the total review time for the same link.&lt;br /&gt;
&lt;br /&gt;
== Related Files ==&lt;br /&gt;
1. review_time.rb&lt;br /&gt;
&lt;br /&gt;
2. response_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. response/response.html.erb &lt;br /&gt;
&lt;br /&gt;
4. response_times_controller.rb&lt;br /&gt;
&lt;br /&gt;
5. review_mapping/_review_report.html.erb &lt;br /&gt;
&lt;br /&gt;
6. review_mapping/_review_submissions_time_spent.html.erb&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
[mailto:sli41@ncsu.edu Shijie Li]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:wsun12@ncsu.edu Wei Sun]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:asundar2@ncsu.edu Aishwarya Sundararajan]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:dbhanda@ncsu.edu Darshan Balakrishna Bhandari]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Asundar2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1791._Track_the_time_that_students_look_at_the_other_submissions_-_logging_improvement&amp;diff=113821</id>
		<title>CSC/ECE 517 Fall 2017/E1791. Track the time that students look at the other submissions - logging improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1791._Track_the_time_that_students_look_at_the_other_submissions_-_logging_improvement&amp;diff=113821"/>
		<updated>2017-11-28T22:40:37Z</updated>

		<summary type="html">&lt;p&gt;Asundar2: /* Related Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The expertiza project takes advantage of peer-review among students to allow them to learn from each other. To track the review time that each student spend on each submitted resources is meaningful to instructors to study and improve the teach experience. However, the time tracking of specific content on these resources is not perfect in the expertiza system. The previous team working on E1705 project has solved part of such problems by tracking the active time of windows opened from the submitted links. But for the submitted files which could be downloaded for local review, there is only a rough approximation solution yet. In this project, our team is going to solve this problem as well as improving previous time tracking methods using mature third-party APIs to record link review time more accurately. To accomplish this goal, here are the tasks needed to be done:&lt;br /&gt;
&lt;br /&gt;
*Design a database schema for logging the time a reviewer spend on a submission;&lt;br /&gt;
*Design and implement a solution that handles the use case, where students’ submissions are hosted on an external website using third-party APIs, e.g. gem: [https://github.com/octokit/octokit.rb Octokit] for Github use case;&lt;br /&gt;
*Modify Review report (views/review_mapping/_review_report.html.erb) to show the time spent on each submission.&lt;br /&gt;
&lt;br /&gt;
== Problem Description ==&lt;br /&gt;
Our team is going to solve the submission review time tracking by attempting to open the downloaded files inside popup windows of the web browser in order to record the time on the client side. &lt;br /&gt;
&lt;br /&gt;
=== Type of submitted files ===&lt;br /&gt;
For most of our tasks, there are two types of submitted files. &lt;br /&gt;
&lt;br /&gt;
1. One kind is online links, such as github repo or pull request link, youtube video link, expertiza wiki page link, etc&lt;br /&gt;
&lt;br /&gt;
2. The other one includes files such as pdf, txt, doc, images, etc and other download contents.&lt;br /&gt;
&lt;br /&gt;
=== Database shcema design ===&lt;br /&gt;
For this project, we need to design a database table to store all the time that we need to record for each review submission. We would like to name the table as '''review_time'''. For the table, we would use '''map_id''' in table response, which uses '''response_map_id''' as the primary information. Then we need to record '''reviewer_id''' and '''reviewee_id''', '''file_link''' for submitted files, as well as time '''start_at''' and '''end_at''', then store them in the table.&lt;br /&gt;
&lt;br /&gt;
[[File:E1791db.png]]&lt;br /&gt;
&lt;br /&gt;
=== Time tracking mechanism ===&lt;br /&gt;
&lt;br /&gt;
[[File:E1791_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
For each review, when the reviewer click on one link of the submitted files, we create an entry to the table review_time, we will write a function to record current time to the database. &lt;br /&gt;
&lt;br /&gt;
For how to determine time when the reviewer complete with the opened link, there are different cases. If the reviewer click on save or submit button, close the page, or logout, we need to write to all open entry (without end_at) respect to this review and save current time to end_at. But for how to decide when the review close the opened link is a little complicated. For github and youtube links and txt, pdf, doc, image files, we will open submitted files in views/response/_submitted_files.html.erb so that when the user click on the link, it opens a popup window that shows the submission, record time when it opens and closes. This is done by controlling DOM using jQuery javascript library, and then send back the time records through Ajax. For the other files that need to be downloaded, we can only make an approximation by record the time when the reviewer click on the link until the time he/she enter the reviews.&lt;br /&gt;
&lt;br /&gt;
=== View modification ===&lt;br /&gt;
After we record start_at and end_at time for each piece of review, we need to display time that each reviewer spent for each link. Because the reviewer may save the review and start again in the future, so for each link there might be several entries, we need to sum them together. We will try to modify code in review_mapping/_review_report.html.erb first to modify the view. This framework follows well the &amp;quot;open to extension and close to modification&amp;quot; principle, which makes further changes more feasible by adding additional view components without affecting current functions.&lt;br /&gt;
&lt;br /&gt;
=== Edge cases ===&lt;br /&gt;
User shuts down browser during review.&amp;lt;br&amp;gt;&lt;br /&gt;
User logs out while review reference windows still open.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== UI and Manual test ===&lt;br /&gt;
We will test the following cases during our development&lt;br /&gt;
&lt;br /&gt;
1. When we work the review, if we click on GitHub link, GitHub pull request link, check whether the system record review time correctly.&lt;br /&gt;
&lt;br /&gt;
2. When we work the review, if we click on doc, pdf, image link, check whether system open submitted files in views/response/_submitted_files.html.erb and recore the review time correctly.&lt;br /&gt;
&lt;br /&gt;
3. Check if the reviewer save the process and start again with click on same clink, check whether the system will record all the entry, and on the view page take all entries for one link into account.&lt;br /&gt;
&lt;br /&gt;
=== Rspec Test ===&lt;br /&gt;
Test of new model and function will be written and tested during project development:&lt;br /&gt;
* Test the success of a review time record given valid start and end time;&lt;br /&gt;
* Test the error handler when a review time record fails to save;&lt;br /&gt;
* Test the calculation of the total review time for the same link.&lt;br /&gt;
&lt;br /&gt;
== Related Files ==&lt;br /&gt;
1. review_time.rb&lt;br /&gt;
&lt;br /&gt;
2. response_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. response/response.html.erb &lt;br /&gt;
&lt;br /&gt;
4. response_times_controller.rb&lt;br /&gt;
&lt;br /&gt;
5. review_mapping/_review_report.html.erb &lt;br /&gt;
&lt;br /&gt;
6. review_mapping/_review_submissions_time_spent.html.erb&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
[mailto:sli41@ncsu.edu Shijie Li]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:wsun12@ncsu.edu Wei Sun]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:asundar2@ncsu.edu Aishwarya Sundararajan]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:dbhanda@ncsu.edu Darshan Balakrishna Bhandari]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Asundar2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1791._Track_the_time_that_students_look_at_the_other_submissions_-_logging_improvement&amp;diff=113820</id>
		<title>CSC/ECE 517 Fall 2017/E1791. Track the time that students look at the other submissions - logging improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1791._Track_the_time_that_students_look_at_the_other_submissions_-_logging_improvement&amp;diff=113820"/>
		<updated>2017-11-28T22:31:26Z</updated>

		<summary type="html">&lt;p&gt;Asundar2: /* Related Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The expertiza project takes advantage of peer-review among students to allow them to learn from each other. To track the review time that each student spend on each submitted resources is meaningful to instructors to study and improve the teach experience. However, the time tracking of specific content on these resources is not perfect in the expertiza system. The previous team working on E1705 project has solved part of such problems by tracking the active time of windows opened from the submitted links. But for the submitted files which could be downloaded for local review, there is only a rough approximation solution yet. In this project, our team is going to solve this problem as well as improving previous time tracking methods using mature third-party APIs to record link review time more accurately. To accomplish this goal, here are the tasks needed to be done:&lt;br /&gt;
&lt;br /&gt;
*Design a database schema for logging the time a reviewer spend on a submission;&lt;br /&gt;
*Design and implement a solution that handles the use case, where students’ submissions are hosted on an external website using third-party APIs, e.g. gem: [https://github.com/octokit/octokit.rb Octokit] for Github use case;&lt;br /&gt;
*Modify Review report (views/review_mapping/_review_report.html.erb) to show the time spent on each submission.&lt;br /&gt;
&lt;br /&gt;
== Problem Description ==&lt;br /&gt;
Our team is going to solve the submission review time tracking by attempting to open the downloaded files inside popup windows of the web browser in order to record the time on the client side. &lt;br /&gt;
&lt;br /&gt;
=== Type of submitted files ===&lt;br /&gt;
For most of our tasks, there are two types of submitted files. &lt;br /&gt;
&lt;br /&gt;
1. One kind is online links, such as github repo or pull request link, youtube video link, expertiza wiki page link, etc&lt;br /&gt;
&lt;br /&gt;
2. The other one includes files such as pdf, txt, doc, images, etc and other download contents.&lt;br /&gt;
&lt;br /&gt;
=== Database shcema design ===&lt;br /&gt;
For this project, we need to design a database table to store all the time that we need to record for each review submission. We would like to name the table as '''review_time'''. For the table, we would use '''map_id''' in table response, which uses '''response_map_id''' as the primary information. Then we need to record '''reviewer_id''' and '''reviewee_id''', '''file_link''' for submitted files, as well as time '''start_at''' and '''end_at''', then store them in the table.&lt;br /&gt;
&lt;br /&gt;
[[File:E1791db.png]]&lt;br /&gt;
&lt;br /&gt;
=== Time tracking mechanism ===&lt;br /&gt;
&lt;br /&gt;
[[File:E1791_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
For each review, when the reviewer click on one link of the submitted files, we create an entry to the table review_time, we will write a function to record current time to the database. &lt;br /&gt;
&lt;br /&gt;
For how to determine time when the reviewer complete with the opened link, there are different cases. If the reviewer click on save or submit button, close the page, or logout, we need to write to all open entry (without end_at) respect to this review and save current time to end_at. But for how to decide when the review close the opened link is a little complicated. For github and youtube links and txt, pdf, doc, image files, we will open submitted files in views/response/_submitted_files.html.erb so that when the user click on the link, it opens a popup window that shows the submission, record time when it opens and closes. This is done by controlling DOM using jQuery javascript library, and then send back the time records through Ajax. For the other files that need to be downloaded, we can only make an approximation by record the time when the reviewer click on the link until the time he/she enter the reviews.&lt;br /&gt;
&lt;br /&gt;
=== View modification ===&lt;br /&gt;
After we record start_at and end_at time for each piece of review, we need to display time that each reviewer spent for each link. Because the reviewer may save the review and start again in the future, so for each link there might be several entries, we need to sum them together. We will try to modify code in review_mapping/_review_report.html.erb first to modify the view. This framework follows well the &amp;quot;open to extension and close to modification&amp;quot; principle, which makes further changes more feasible by adding additional view components without affecting current functions.&lt;br /&gt;
&lt;br /&gt;
=== Edge cases ===&lt;br /&gt;
User shuts down browser during review.&amp;lt;br&amp;gt;&lt;br /&gt;
User logs out while review reference windows still open.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== UI and Manual test ===&lt;br /&gt;
We will test the following cases during our development&lt;br /&gt;
&lt;br /&gt;
1. When we work the review, if we click on GitHub link, GitHub pull request link, check whether the system record review time correctly.&lt;br /&gt;
&lt;br /&gt;
2. When we work the review, if we click on doc, pdf, image link, check whether system open submitted files in views/response/_submitted_files.html.erb and recore the review time correctly.&lt;br /&gt;
&lt;br /&gt;
3. Check if the reviewer save the process and start again with click on same clink, check whether the system will record all the entry, and on the view page take all entries for one link into account.&lt;br /&gt;
&lt;br /&gt;
=== Rspec Test ===&lt;br /&gt;
Test of new model and function will be written and tested during project development:&lt;br /&gt;
* Test the success of a review time record given valid start and end time;&lt;br /&gt;
* Test the error handler when a review time record fails to save;&lt;br /&gt;
* Test the calculation of the total review time for the same link.&lt;br /&gt;
&lt;br /&gt;
== Related Files ==&lt;br /&gt;
1. review_time.rb&lt;br /&gt;
&lt;br /&gt;
2. response_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. response/response.html.erb &lt;br /&gt;
&lt;br /&gt;
4. response_time_controller.rb&lt;br /&gt;
&lt;br /&gt;
5. review_mapping/_review_report.html.erb &lt;br /&gt;
&lt;br /&gt;
6. review_mapping/_review_submissions_time_spent.html.erb&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
[mailto:sli41@ncsu.edu Shijie Li]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:wsun12@ncsu.edu Wei Sun]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:asundar2@ncsu.edu Aishwarya Sundararajan]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:dbhanda@ncsu.edu Darshan Balakrishna Bhandari]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Asundar2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1791._Track_the_time_that_students_look_at_the_other_submissions_-_logging_improvement&amp;diff=113819</id>
		<title>CSC/ECE 517 Fall 2017/E1791. Track the time that students look at the other submissions - logging improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1791._Track_the_time_that_students_look_at_the_other_submissions_-_logging_improvement&amp;diff=113819"/>
		<updated>2017-11-28T22:12:44Z</updated>

		<summary type="html">&lt;p&gt;Asundar2: /* Database shcema design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The expertiza project takes advantage of peer-review among students to allow them to learn from each other. To track the review time that each student spend on each submitted resources is meaningful to instructors to study and improve the teach experience. However, the time tracking of specific content on these resources is not perfect in the expertiza system. The previous team working on E1705 project has solved part of such problems by tracking the active time of windows opened from the submitted links. But for the submitted files which could be downloaded for local review, there is only a rough approximation solution yet. In this project, our team is going to solve this problem as well as improving previous time tracking methods using mature third-party APIs to record link review time more accurately. To accomplish this goal, here are the tasks needed to be done:&lt;br /&gt;
&lt;br /&gt;
*Design a database schema for logging the time a reviewer spend on a submission;&lt;br /&gt;
*Design and implement a solution that handles the use case, where students’ submissions are hosted on an external website using third-party APIs, e.g. gem: [https://github.com/octokit/octokit.rb Octokit] for Github use case;&lt;br /&gt;
*Modify Review report (views/review_mapping/_review_report.html.erb) to show the time spent on each submission.&lt;br /&gt;
&lt;br /&gt;
== Problem Description ==&lt;br /&gt;
Our team is going to solve the submission review time tracking by attempting to open the downloaded files inside popup windows of the web browser in order to record the time on the client side. &lt;br /&gt;
&lt;br /&gt;
=== Type of submitted files ===&lt;br /&gt;
For most of our tasks, there are two types of submitted files. &lt;br /&gt;
&lt;br /&gt;
1. One kind is online links, such as github repo or pull request link, youtube video link, expertiza wiki page link, etc&lt;br /&gt;
&lt;br /&gt;
2. The other one includes files such as pdf, txt, doc, images, etc and other download contents.&lt;br /&gt;
&lt;br /&gt;
=== Database shcema design ===&lt;br /&gt;
For this project, we need to design a database table to store all the time that we need to record for each review submission. We would like to name the table as '''review_time'''. For the table, we would use '''map_id''' in table response, which uses '''response_map_id''' as the primary information. Then we need to record '''reviewer_id''' and '''reviewee_id''', '''file_link''' for submitted files, as well as time '''start_at''' and '''end_at''', then store them in the table.&lt;br /&gt;
&lt;br /&gt;
[[File:E1791db.png]]&lt;br /&gt;
&lt;br /&gt;
=== Time tracking mechanism ===&lt;br /&gt;
&lt;br /&gt;
[[File:E1791_flowchart.png]]&lt;br /&gt;
&lt;br /&gt;
For each review, when the reviewer click on one link of the submitted files, we create an entry to the table review_time, we will write a function to record current time to the database. &lt;br /&gt;
&lt;br /&gt;
For how to determine time when the reviewer complete with the opened link, there are different cases. If the reviewer click on save or submit button, close the page, or logout, we need to write to all open entry (without end_at) respect to this review and save current time to end_at. But for how to decide when the review close the opened link is a little complicated. For github and youtube links and txt, pdf, doc, image files, we will open submitted files in views/response/_submitted_files.html.erb so that when the user click on the link, it opens a popup window that shows the submission, record time when it opens and closes. This is done by controlling DOM using jQuery javascript library, and then send back the time records through Ajax. For the other files that need to be downloaded, we can only make an approximation by record the time when the reviewer click on the link until the time he/she enter the reviews.&lt;br /&gt;
&lt;br /&gt;
=== View modification ===&lt;br /&gt;
After we record start_at and end_at time for each piece of review, we need to display time that each reviewer spent for each link. Because the reviewer may save the review and start again in the future, so for each link there might be several entries, we need to sum them together. We will try to modify code in review_mapping/_review_report.html.erb first to modify the view. This framework follows well the &amp;quot;open to extension and close to modification&amp;quot; principle, which makes further changes more feasible by adding additional view components without affecting current functions.&lt;br /&gt;
&lt;br /&gt;
=== Edge cases ===&lt;br /&gt;
User shuts down browser during review.&amp;lt;br&amp;gt;&lt;br /&gt;
User logs out while review reference windows still open.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== UI and Manual test ===&lt;br /&gt;
We will test the following cases during our development&lt;br /&gt;
&lt;br /&gt;
1. When we work the review, if we click on GitHub link, GitHub pull request link, check whether the system record review time correctly.&lt;br /&gt;
&lt;br /&gt;
2. When we work the review, if we click on doc, pdf, image link, check whether system open submitted files in views/response/_submitted_files.html.erb and recore the review time correctly.&lt;br /&gt;
&lt;br /&gt;
3. Check if the reviewer save the process and start again with click on same clink, check whether the system will record all the entry, and on the view page take all entries for one link into account.&lt;br /&gt;
&lt;br /&gt;
=== Rspec Test ===&lt;br /&gt;
Test of new model and function will be written and tested during project development:&lt;br /&gt;
* Test the success of a review time record given valid start and end time;&lt;br /&gt;
* Test the error handler when a review time record fails to save;&lt;br /&gt;
* Test the calculation of the total review time for the same link.&lt;br /&gt;
&lt;br /&gt;
== Related Files ==&lt;br /&gt;
1. review_time.rb&lt;br /&gt;
&lt;br /&gt;
2. response_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. response/response.html.erb &lt;br /&gt;
&lt;br /&gt;
4. review_time_controller.rb&lt;br /&gt;
&lt;br /&gt;
5. review_mapping/_review_report.html.erb &lt;br /&gt;
&lt;br /&gt;
6. review_mapping/_review_submissions_time_spent.html.erb&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
[mailto:sli41@ncsu.edu Shijie Li]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:wsun12@ncsu.edu Wei Sun]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:asundar2@ncsu.edu Aishwarya Sundararajan]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:dbhanda@ncsu.edu Darshan Balakrishna Bhandari]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Asundar2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1774_Metareview_fixes_and_improvements.rb&amp;diff=111548</id>
		<title>CSC/ECE 517 Fall 2017/E1774 Metareview fixes and improvements.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1774_Metareview_fixes_and_improvements.rb&amp;diff=111548"/>
		<updated>2017-11-03T00:03:21Z</updated>

		<summary type="html">&lt;p&gt;Asundar2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
==='''Problem Statement'''===&lt;br /&gt;
In Expertiza, the metareview feature in Expertiza enables a third party to evaluate the quality of feedback that a reviewer gives to a reviewee. Metareview is an important feature that can help students become a better reviewer for their peers by providing detailed feedback that is actionable and positively formulated. &lt;br /&gt;
Unfortunately, this feature is broken and the following issues were identified. Your task is to fix these issues so that this feature can be used again. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
==='''Team Members'''===&lt;br /&gt;
The team members who worked on this particular problem are:-&lt;br /&gt;
&lt;br /&gt;
Rachit Agarwal&lt;br /&gt;
&lt;br /&gt;
Cherukeshi Machan&lt;br /&gt;
&lt;br /&gt;
Aishwarya Sundararajan&lt;br /&gt;
&lt;br /&gt;
=='''Issues'''==&lt;br /&gt;
&lt;br /&gt;
==='''[https://github.com/expertiza/expertiza/issues/970 Issue #970] '''===&lt;br /&gt;
Dynamic assignment of metareviews does not work. When requesting a new metareview to perform, it shows NoMethodError undefined method ‘includes?’ in assignment.rb line 102.&lt;br /&gt;
&lt;br /&gt;
Fix:&lt;br /&gt;
This line has been fixed and now checks if response_map.reviewer == metareviewer rather than response_map.reviewer.includes?(metareviewer), which was invalid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
response_map.reviewee == metareviewer or response_map.reviewer == metareviewer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''[https://github.com/expertiza/expertiza/issues/298 Issue #298]'''===&lt;br /&gt;
New Feature: Metareviewer should be able to see author feedback. Currently, the metareviewer can only see the review and doesn't have access to the author feedback.&lt;br /&gt;
&lt;br /&gt;
Implementation: This feature is implemented using the &amp;quot;reviewed_object_id&amp;quot; from the &amp;quot;response_maps&amp;quot; table to fetch the authors feedback for the particular reviewed id. Below are the code changes for implementing this feature.&lt;br /&gt;
&lt;br /&gt;
responses.html&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if map.type.to_s == &amp;quot;MetareviewResponseMap&amp;quot; %&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt; &amp;lt;%= link_to &amp;quot;Author's Feedback&amp;quot;, {controller: 'student_review', action: 'show_authors_feedback',:id =&amp;gt; map.reviewed_object_id}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
student_review_controller.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def show_authors_feedback&lt;br /&gt;
    @map = FeedbackResponseMap.find_by(reviewed_object_id: params[:id])&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
show_authors_feedback.html&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @map and !@map.response.empty? then %&amp;gt;&lt;br /&gt;
    &amp;lt;%= @map.response.last.display_as_html %&amp;gt;&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
    &amp;lt;h3&amp;gt;Feedback from author&amp;lt;/h3&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt; No feedback done yet.&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;javascript:window.history.back()&amp;quot;&amp;gt;Back&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''[https://github.com/expertiza/expertiza/issues/198 Issue #198] '''===&lt;br /&gt;
&lt;br /&gt;
Meta-reviews do not show the review to be reviewed. When I am assigned the meta-review, the original review I'm supposed to critique is not shown, only the link to the wiki article and the review rubric.&lt;br /&gt;
&lt;br /&gt;
Fix:&lt;br /&gt;
Updated response.html.erb: Previously, this view was rendering a partial which was actually not present in the views. So we are not rendering that partial anymore. &lt;br /&gt;
Now the actual review is displayed by calling an action of response.controller to show the original review which metareviewer is supposed to critique.&lt;br /&gt;
&lt;br /&gt;
Old Code&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;% if @responses_versions.empty? %&amp;gt;&lt;br /&gt;
    &amp;lt;I&amp;gt;No previous review was performed.&amp;lt;/I&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;hr/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;% else %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'review', :locals =&amp;gt; {:versions =&amp;gt; @responses_versions} %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
New Code&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @responses_versions.empty? %&amp;gt;&lt;br /&gt;
    &amp;lt;I&amp;gt;No previous review was performed.&amp;lt;/I&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;hr/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;%= @responses_versions.each do |response| %&amp;gt;&lt;br /&gt;
            &amp;lt;%= response.display_as_html() %&amp;gt;&lt;br /&gt;
            &amp;lt;br/&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;hr/&amp;gt;&lt;br /&gt;
    &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''[https://github.com/expertiza/expertiza/issues/162 Issue #162]'''===&lt;br /&gt;
Student selected a new meta review they get their own project to metareview&lt;br /&gt;
&lt;br /&gt;
This functionality is working fine as per the requirement. When a user selects a new metareview, a review is assigned to the user to be reviewed, which have the different author other than the User. This can be tested using the test scenario mentioned in the testing section.&lt;br /&gt;
&lt;br /&gt;
==='''[https://github.com/expertiza/expertiza/issues/145 Issue #145]'''===&lt;br /&gt;
Metareviews need to be fixed to work with staggered-deadline assignments&lt;br /&gt;
&lt;br /&gt;
Fix:&lt;br /&gt;
The submission is reviewable if the submission is in a stage where reviews can be done. It does not depend on the stage of the topic the reviewer is writing on. The same has been incorporated by the below changes.&lt;br /&gt;
&lt;br /&gt;
Code mentioned in defect:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @assignment.review_allowed(@reviewee_topic_id) or @assignment.metareview_allowed(nil) or @assignment.get_current_stage(@participant.topic_id) == &amp;quot;Complete&amp;quot; %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updated code:&lt;br /&gt;
&lt;br /&gt;
student_task/view.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if check_reviewable_topics(@assignment) or @assignment.metareview_allowed(nil) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
student_task_helper.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def check_reviewable_topics(assignment)&lt;br /&gt;
    return true if !assignment.has_topics? and assignment.get_current_stage != &amp;quot;submission&amp;quot;&lt;br /&gt;
    sign_up_topics = SignUpTopic.where(assignment_id: assignment.id)&lt;br /&gt;
    sign_up_topics.each {|topic| return true if assignment.can_review(topic.id) }&lt;br /&gt;
    false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
&lt;br /&gt;
==='''Automated'''===&lt;br /&gt;
&lt;br /&gt;
===='''Issue #970 '''====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 describe &amp;quot;GET #new_feedback&amp;quot; do&lt;br /&gt;
      it &amp;quot;redirects to new if review object is found&amp;quot; do&lt;br /&gt;
        allow(Response).to receive(:find).and_return(review)&lt;br /&gt;
        allow(session[:user]).to receive(:id).and_return(1)&lt;br /&gt;
        allow(review).to receive_message_chain(:map, :assignment, :id).and_return(1)&lt;br /&gt;
        allow(review).to receive_message_chain(:map, :reviewer, :id).and_return(1)&lt;br /&gt;
        allow_any_instance_of(AssignmentParticipant).to receive_message_chain(:where, :first).and_return(assignment)&lt;br /&gt;
        allow_any_instance_of(FeedbackResponseMap).to receive_message_chain(:where, :first).and_return(map)&lt;br /&gt;
        allow_any_instance_of(FeedbackResponseMap).to receive(:create).and_return(map)&lt;br /&gt;
&lt;br /&gt;
        get :new_feedback&lt;br /&gt;
&lt;br /&gt;
        expect(response).to redirect_to action: :new, id: map.id, return: &amp;quot;feedback&amp;quot;&lt;br /&gt;
      end&lt;br /&gt;
      it &amp;quot;redirects to same page if no review is found&amp;quot; do&lt;br /&gt;
        allow(Response).to receive(:find).and_return(false)&lt;br /&gt;
        expect(response).to have_http_status(200)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Issue #298'''====&lt;br /&gt;
We wrote test for Issue &amp;quot;Metareviewer should be able to see author feedback&amp;quot;. student_review_controller_spec.rb file has been created&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RSpec.describe StudentReviewController do&lt;br /&gt;
  context 'logged in as metareviewer' do&lt;br /&gt;
    let(:review) { Response.create(map_id: 1, additional_comment: 'hello', round: 1) }&lt;br /&gt;
    let(:map) { FeedbackResponseMap.create(reviewed_object_id: 1, reviewer_id: 1, reviewee_id: 1) }&lt;br /&gt;
    let(:assignment) { AssignmentParticipant.new }&lt;br /&gt;
    let(:responsemap) { ResponseMap.new }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    describe &amp;quot;GET #authorFeedback&amp;quot; do&lt;br /&gt;
      it &amp;quot;returns authors feedback&amp;quot; do&lt;br /&gt;
        get :show_authors_Feedback&lt;br /&gt;
        expect(response).to redirect_to(request.env['HTTP_REFERER'] ? :back : :root)&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 StudentReviewController logged in as metareviewer GET #authorFeedback returns authors feedback&lt;br /&gt;
  0.21359 seconds ./spec/controllers/student_review_controller_spec.rb:12&lt;br /&gt;
&lt;br /&gt;
1 example, 0 failures, 1 passed&lt;br /&gt;
&lt;br /&gt;
Finished in 0.563879969 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Issue #198'''====&lt;br /&gt;
&lt;br /&gt;
==='''Manual '''===&lt;br /&gt;
&lt;br /&gt;
===='''Issue #970 '''====&lt;br /&gt;
&lt;br /&gt;
1) Login as Admin, create an assignment with all the necessary details like maximum no of users per team, add topics for the assignment, enroll users(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2) Select checkbox &amp;quot;add metareview deadlines&amp;quot;, select dates and add metareview rubric for the same.&lt;br /&gt;
&lt;br /&gt;
3) Go back to manage assignment and add select Assign reviewers.&lt;br /&gt;
&lt;br /&gt;
4) Add meta-reviewer to a particular review submitted by students.&lt;br /&gt;
&lt;br /&gt;
5) Impersonate the meta-reviewer assigned above and go to others work for the same assignment.&lt;br /&gt;
&lt;br /&gt;
6) Select the option &amp;quot;request a new metareview&amp;quot; and a new review will be dynamically assigned for meta-review.&lt;br /&gt;
&lt;br /&gt;
===='''Issue #298'''====&lt;br /&gt;
&lt;br /&gt;
1) Login as Admin, create an assignment with all the necessary details like maximum no of users per team, add topics for the assignment, enroll users(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2) Select checkbox &amp;quot;add metareview deadlines&amp;quot;, select dates and add metareview rubric for the same.&lt;br /&gt;
&lt;br /&gt;
3) Go back to manage assignment and add select Assign reviewers.&lt;br /&gt;
&lt;br /&gt;
4) Add meta-reviewer to a particular review submitted by students.&lt;br /&gt;
&lt;br /&gt;
5) Impersonate the meta-reviewer assigned above and go to others work for the same assignment.&lt;br /&gt;
&lt;br /&gt;
6) Select the option &amp;quot;request a new metareview&amp;quot; and a new review will be dynamically assigned for meta-review.&lt;br /&gt;
&lt;br /&gt;
7) Option to view the author's feedback will be visible next to Begin button.&lt;br /&gt;
&lt;br /&gt;
===='''Issue #198'''====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) Login as Admin, create an assignment with all the necessary details like maximum no of users per team, add topics for the assignment, enroll users(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2) Select checkbox &amp;quot;add metareview deadlines&amp;quot;, select dates and add metareview rubric for the same.&lt;br /&gt;
&lt;br /&gt;
3) Go back to manage assignment and add select Assign reviewers.&lt;br /&gt;
&lt;br /&gt;
4) Add meta-reviewer to a particular review submitted by students.&lt;br /&gt;
&lt;br /&gt;
5) Impersonate the meta-reviewer assigned above and go to others work for the same assignment.&lt;br /&gt;
&lt;br /&gt;
6) Select the option &amp;quot;request a new metareview&amp;quot; and a new review will be dynamically assigned for meta-review.&lt;br /&gt;
&lt;br /&gt;
7) click begin button and show review option should be visible on the top to view the origin review to be reviewed.&lt;br /&gt;
&lt;br /&gt;
===='''Issue #162'''====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) Login as Admin, create an assignment with all the necessary details like maximum no of users per team, add topics for the assignment, enroll users(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2) Select checkbox &amp;quot;add metareview deadlines&amp;quot;, select dates and add metareview rubric for the same.&lt;br /&gt;
&lt;br /&gt;
3) Go back to manage assignment and add select Assign reviewers.&lt;br /&gt;
&lt;br /&gt;
4) Add meta-reviewer to a particular review submitted by students.&lt;br /&gt;
&lt;br /&gt;
5) Impersonate the meta-reviewer assigned above and go to others work for the same assignment.&lt;br /&gt;
&lt;br /&gt;
6) Select the option &amp;quot;request a new metareview&amp;quot; and a new review will be dynamically assigned for meta-review.&lt;br /&gt;
&lt;br /&gt;
7) Select begin button.&lt;br /&gt;
&lt;br /&gt;
8) The submitted work is different from the work submitted by the metareviewer.&lt;br /&gt;
&lt;br /&gt;
===='''Issue #145'''====&lt;br /&gt;
&lt;br /&gt;
1) Login as Admin, create an assignment with all the necessary details like maximum no of users per team, add topics for the assignment, enroll users(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2) Select checkbox &amp;quot;add metareview deadlines&amp;quot;, select &amp;quot;Staggered deadline assignment?&amp;quot; checkbox in general tab and update the deadlines for metareview in &amp;quot;due dates&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
3) Go back to manage assignment and add select Assign reviewers.&lt;br /&gt;
&lt;br /&gt;
4) Add meta-reviewer to a particular review submitted by students.&lt;br /&gt;
&lt;br /&gt;
5) Impersonate the meta-reviewer assigned above and go to others work for the same assignment.&lt;br /&gt;
&lt;br /&gt;
6) &amp;quot;Request a new metareview&amp;quot; option should be visible to the user if the deadline is the future date for that particular assignment.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;/div&gt;</summary>
		<author><name>Asundar2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1774_Metareview_fixes_and_improvements.rb&amp;diff=111547</id>
		<title>CSC/ECE 517 Fall 2017/E1774 Metareview fixes and improvements.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1774_Metareview_fixes_and_improvements.rb&amp;diff=111547"/>
		<updated>2017-11-03T00:02:12Z</updated>

		<summary type="html">&lt;p&gt;Asundar2: /* Issue #298 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
==='''Problem Statement'''===&lt;br /&gt;
In Expertiza, the metareview feature in Expertiza enables a third party to evaluate the quality of feedback that a reviewer gives to a reviewee. Metareview is an important feature that can help students become a better reviewer for their peers by providing detailed feedback that is actionable and positively formulated. &lt;br /&gt;
Unfortunately, this feature is broken and the following issues were identified. Your task is to fix these issues so that this feature can be used again. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
==='''Team Members'''===&lt;br /&gt;
The team members who worked on this particular problem are:-&lt;br /&gt;
&lt;br /&gt;
Rachit Agarwal&lt;br /&gt;
&lt;br /&gt;
Cherukeshi Machan&lt;br /&gt;
&lt;br /&gt;
Aishwarya Sundararajan&lt;br /&gt;
&lt;br /&gt;
=='''Issues'''==&lt;br /&gt;
&lt;br /&gt;
==='''[https://github.com/expertiza/expertiza/issues/970 Issue #970] '''===&lt;br /&gt;
Dynamic assignment of metareviews does not work. When requesting a new metareview to perform, it shows NoMethodError undefined method ‘includes?’ in assignment.rb line 102.&lt;br /&gt;
&lt;br /&gt;
Fix:&lt;br /&gt;
This line has been fixed and now checks if response_map.reviewer == metareviewer rather than response_map.reviewer.includes?(metareviewer), which was invalid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
response_map.reviewee == metareviewer or response_map.reviewer == metareviewer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''[https://github.com/expertiza/expertiza/issues/298 Issue #298]'''===&lt;br /&gt;
New Feature: Metareviewer should be able to see author feedback. Currently, the metareviewer can only see the review and doesn't have access to the author feedback.&lt;br /&gt;
&lt;br /&gt;
Implementation: This feature is implemented using the &amp;quot;reviewed_object_id&amp;quot; from the &amp;quot;response_maps&amp;quot; table to fetch the authors feedback for the particular reviewed id. Below are the code changes for implementing this feature.&lt;br /&gt;
&lt;br /&gt;
responses.html&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if map.type.to_s == &amp;quot;MetareviewResponseMap&amp;quot; %&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt; &amp;lt;%= link_to &amp;quot;Author's Feedback&amp;quot;, {controller: 'student_review', action: 'show_authors_feedback',:id =&amp;gt; map.reviewed_object_id}%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
student_review_controller.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def show_authors_feedback&lt;br /&gt;
    @map = FeedbackResponseMap.find_by(reviewed_object_id: params[:id])&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
show_authors_feedback.html&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @map and !@map.response.empty? then %&amp;gt;&lt;br /&gt;
    &amp;lt;%= @map.response.last.display_as_html %&amp;gt;&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
    &amp;lt;h3&amp;gt;Feedback from author&amp;lt;/h3&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt; No feedback done yet.&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;javascript:window.history.back()&amp;quot;&amp;gt;Back&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''[https://github.com/expertiza/expertiza/issues/198 Issue #198] '''===&lt;br /&gt;
&lt;br /&gt;
Meta-reviews do not show the review to be reviewed. When I am assigned the meta-review, the original review I'm supposed to critique is not shown, only the link to the wiki article and the review rubric.&lt;br /&gt;
&lt;br /&gt;
Fix:&lt;br /&gt;
Updated response.html.erb: Previously, this view was rendering a partial which was actually not present in the views. So we are not rendering that partial anymore. &lt;br /&gt;
Now the actual review is displayed by calling an action of response.controller to show the original review which metareviewer is supposed to critique.&lt;br /&gt;
&lt;br /&gt;
Old Code&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;% if @responses_versions.empty? %&amp;gt;&lt;br /&gt;
    &amp;lt;I&amp;gt;No previous review was performed.&amp;lt;/I&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;hr/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;% else %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'review', :locals =&amp;gt; {:versions =&amp;gt; @responses_versions} %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
New Code&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @responses_versions.empty? %&amp;gt;&lt;br /&gt;
    &amp;lt;I&amp;gt;No previous review was performed.&amp;lt;/I&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;hr/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;%= @responses_versions.each do |response| %&amp;gt;&lt;br /&gt;
            &amp;lt;%= response.display_as_html() %&amp;gt;&lt;br /&gt;
            &amp;lt;br/&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;hr/&amp;gt;&lt;br /&gt;
    &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''[https://github.com/expertiza/expertiza/issues/162 Issue #162]'''===&lt;br /&gt;
Student selected a new meta review they get their own project to metareview&lt;br /&gt;
&lt;br /&gt;
This functionality is working fine as per the requirement. When a user selects a new metareview, a review is assigned to the user to be reviewed, which have the different author other than the User. This can be tested using the test scenario mentioned in the testing section.&lt;br /&gt;
&lt;br /&gt;
==='''[https://github.com/expertiza/expertiza/issues/145 Issue #145]'''===&lt;br /&gt;
Metareviews need to be fixed to work with staggered-deadline assignments&lt;br /&gt;
&lt;br /&gt;
Fix:&lt;br /&gt;
The submission is reviewable if the submission is in a stage where reviews can be done. It does not depend on the stage of the topic the reviewer is writing on. The same has been incorporated by the below changes.&lt;br /&gt;
&lt;br /&gt;
Code mentioned in defect:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if @assignment.review_allowed(@reviewee_topic_id) or @assignment.metareview_allowed(nil) or @assignment.get_current_stage(@participant.topic_id) == &amp;quot;Complete&amp;quot; %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Updated code:&lt;br /&gt;
&lt;br /&gt;
student_task/view.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if check_reviewable_topics(@assignment) or @assignment.metareview_allowed(nil) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
student_task_helper.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def check_reviewable_topics(assignment)&lt;br /&gt;
    return true if !assignment.has_topics? and assignment.get_current_stage != &amp;quot;submission&amp;quot;&lt;br /&gt;
    sign_up_topics = SignUpTopic.where(assignment_id: assignment.id)&lt;br /&gt;
    sign_up_topics.each {|topic| return true if assignment.can_review(topic.id) }&lt;br /&gt;
    false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Test Plan'''==&lt;br /&gt;
&lt;br /&gt;
==='''Automated'''===&lt;br /&gt;
&lt;br /&gt;
===='''Issue #970 '''====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 describe &amp;quot;GET #new_feedback&amp;quot; do&lt;br /&gt;
      it &amp;quot;redirects to new if review object is found&amp;quot; do&lt;br /&gt;
        allow(Response).to receive(:find).and_return(review)&lt;br /&gt;
        allow(session[:user]).to receive(:id).and_return(1)&lt;br /&gt;
        allow(review).to receive_message_chain(:map, :assignment, :id).and_return(1)&lt;br /&gt;
        allow(review).to receive_message_chain(:map, :reviewer, :id).and_return(1)&lt;br /&gt;
        allow_any_instance_of(AssignmentParticipant).to receive_message_chain(:where, :first).and_return(assignment)&lt;br /&gt;
        allow_any_instance_of(FeedbackResponseMap).to receive_message_chain(:where, :first).and_return(map)&lt;br /&gt;
        allow_any_instance_of(FeedbackResponseMap).to receive(:create).and_return(map)&lt;br /&gt;
&lt;br /&gt;
        get :new_feedback&lt;br /&gt;
&lt;br /&gt;
        expect(response).to redirect_to action: :new, id: map.id, return: &amp;quot;feedback&amp;quot;&lt;br /&gt;
      end&lt;br /&gt;
      it &amp;quot;redirects to same page if no review is found&amp;quot; do&lt;br /&gt;
        allow(Response).to receive(:find).and_return(false)&lt;br /&gt;
        expect(response).to have_http_status(200)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Issue #298'''====&lt;br /&gt;
===='''Issue #298'''====&lt;br /&gt;
We wrote test for Issue &amp;quot;Metareviewer should be able to see author feedback&amp;quot;. student_review_controller_spec.rb file has been created&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RSpec.describe StudentReviewController do&lt;br /&gt;
  context 'logged in as metareviewer' do&lt;br /&gt;
    let(:review) { Response.create(map_id: 1, additional_comment: 'hello', round: 1) }&lt;br /&gt;
    let(:map) { FeedbackResponseMap.create(reviewed_object_id: 1, reviewer_id: 1, reviewee_id: 1) }&lt;br /&gt;
    let(:assignment) { AssignmentParticipant.new }&lt;br /&gt;
    let(:responsemap) { ResponseMap.new }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    describe &amp;quot;GET #authorFeedback&amp;quot; do&lt;br /&gt;
      it &amp;quot;returns authors feedback&amp;quot; do&lt;br /&gt;
        get :show_authors_Feedback&lt;br /&gt;
        expect(response).to redirect_to(request.env['HTTP_REFERER'] ? :back : :root)&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 StudentReviewController logged in as metareviewer GET #authorFeedback returns authors feedback&lt;br /&gt;
  0.21359 seconds ./spec/controllers/student_review_controller_spec.rb:12&lt;br /&gt;
&lt;br /&gt;
1 example, 0 failures, 1 passed&lt;br /&gt;
&lt;br /&gt;
Finished in 0.563879969 seconds&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===='''Issue #198'''====&lt;br /&gt;
&lt;br /&gt;
==='''Manual '''===&lt;br /&gt;
&lt;br /&gt;
===='''Issue #970 '''====&lt;br /&gt;
&lt;br /&gt;
1) Login as Admin, create an assignment with all the necessary details like maximum no of users per team, add topics for the assignment, enroll users(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2) Select checkbox &amp;quot;add metareview deadlines&amp;quot;, select dates and add metareview rubric for the same.&lt;br /&gt;
&lt;br /&gt;
3) Go back to manage assignment and add select Assign reviewers.&lt;br /&gt;
&lt;br /&gt;
4) Add meta-reviewer to a particular review submitted by students.&lt;br /&gt;
&lt;br /&gt;
5) Impersonate the meta-reviewer assigned above and go to others work for the same assignment.&lt;br /&gt;
&lt;br /&gt;
6) Select the option &amp;quot;request a new metareview&amp;quot; and a new review will be dynamically assigned for meta-review.&lt;br /&gt;
&lt;br /&gt;
===='''Issue #298'''====&lt;br /&gt;
&lt;br /&gt;
1) Login as Admin, create an assignment with all the necessary details like maximum no of users per team, add topics for the assignment, enroll users(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2) Select checkbox &amp;quot;add metareview deadlines&amp;quot;, select dates and add metareview rubric for the same.&lt;br /&gt;
&lt;br /&gt;
3) Go back to manage assignment and add select Assign reviewers.&lt;br /&gt;
&lt;br /&gt;
4) Add meta-reviewer to a particular review submitted by students.&lt;br /&gt;
&lt;br /&gt;
5) Impersonate the meta-reviewer assigned above and go to others work for the same assignment.&lt;br /&gt;
&lt;br /&gt;
6) Select the option &amp;quot;request a new metareview&amp;quot; and a new review will be dynamically assigned for meta-review.&lt;br /&gt;
&lt;br /&gt;
7) Option to view the author's feedback will be visible next to Begin button.&lt;br /&gt;
&lt;br /&gt;
===='''Issue #198'''====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) Login as Admin, create an assignment with all the necessary details like maximum no of users per team, add topics for the assignment, enroll users(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2) Select checkbox &amp;quot;add metareview deadlines&amp;quot;, select dates and add metareview rubric for the same.&lt;br /&gt;
&lt;br /&gt;
3) Go back to manage assignment and add select Assign reviewers.&lt;br /&gt;
&lt;br /&gt;
4) Add meta-reviewer to a particular review submitted by students.&lt;br /&gt;
&lt;br /&gt;
5) Impersonate the meta-reviewer assigned above and go to others work for the same assignment.&lt;br /&gt;
&lt;br /&gt;
6) Select the option &amp;quot;request a new metareview&amp;quot; and a new review will be dynamically assigned for meta-review.&lt;br /&gt;
&lt;br /&gt;
7) click begin button and show review option should be visible on the top to view the origin review to be reviewed.&lt;br /&gt;
&lt;br /&gt;
===='''Issue #162'''====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) Login as Admin, create an assignment with all the necessary details like maximum no of users per team, add topics for the assignment, enroll users(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2) Select checkbox &amp;quot;add metareview deadlines&amp;quot;, select dates and add metareview rubric for the same.&lt;br /&gt;
&lt;br /&gt;
3) Go back to manage assignment and add select Assign reviewers.&lt;br /&gt;
&lt;br /&gt;
4) Add meta-reviewer to a particular review submitted by students.&lt;br /&gt;
&lt;br /&gt;
5) Impersonate the meta-reviewer assigned above and go to others work for the same assignment.&lt;br /&gt;
&lt;br /&gt;
6) Select the option &amp;quot;request a new metareview&amp;quot; and a new review will be dynamically assigned for meta-review.&lt;br /&gt;
&lt;br /&gt;
7) Select begin button.&lt;br /&gt;
&lt;br /&gt;
8) The submitted work is different from the work submitted by the metareviewer.&lt;br /&gt;
&lt;br /&gt;
===='''Issue #145'''====&lt;br /&gt;
&lt;br /&gt;
1) Login as Admin, create an assignment with all the necessary details like maximum no of users per team, add topics for the assignment, enroll users(students) in the assignment.&lt;br /&gt;
&lt;br /&gt;
2) Select checkbox &amp;quot;add metareview deadlines&amp;quot;, select &amp;quot;Staggered deadline assignment?&amp;quot; checkbox in general tab and update the deadlines for metareview in &amp;quot;due dates&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
3) Go back to manage assignment and add select Assign reviewers.&lt;br /&gt;
&lt;br /&gt;
4) Add meta-reviewer to a particular review submitted by students.&lt;br /&gt;
&lt;br /&gt;
5) Impersonate the meta-reviewer assigned above and go to others work for the same assignment.&lt;br /&gt;
&lt;br /&gt;
6) &amp;quot;Request a new metareview&amp;quot; option should be visible to the user if the deadline is the future date for that particular assignment.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;/div&gt;</summary>
		<author><name>Asundar2</name></author>
	</entry>
</feed>