<?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=Jcai3</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=Jcai3"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Jcai3"/>
	<updated>2026-07-03T22:13:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130875</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130875"/>
		<updated>2019-12-07T03:38:18Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Manual UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File: UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view.  &lt;br /&gt;
&lt;br /&gt;
As we found that the links and files in review are both stored as URLs, so we only need to list url in reviews. &lt;br /&gt;
&lt;br /&gt;
So We change following methods. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that &lt;br /&gt;
                  shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all URLs below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
As we add new column for Average Author feedback, we add corresponding Rspec test in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the testing process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews in  review_mapping_spec.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls is 24.272% for whole expertiza.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Select the Assignment you want to further check, for example, Final project (and design doc) &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column, for example, student5061 have reviewed Team_BEND_Final_Project and his Average Feedback Score is 13 of total score 15.&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;, for example, student5698 have reviewed Final project(and design doc)_Team_113, and there is a URL about reactkungfu in his review&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain &lt;br /&gt;
* Jing Cai &lt;br /&gt;
* Yongjian Zhu &lt;br /&gt;
* Weiran Fu &lt;br /&gt;
* Dongyuan Wang &lt;br /&gt;
&lt;br /&gt;
== ''' Related Links ''' ==&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1628 pull request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=kTEgNyljAd8 screencast video]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130872</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130872"/>
		<updated>2019-12-07T03:38:04Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Team Information  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File: UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view.  &lt;br /&gt;
&lt;br /&gt;
As we found that the links and files in review are both stored as URLs, so we only need to list url in reviews. &lt;br /&gt;
&lt;br /&gt;
So We change following methods. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that &lt;br /&gt;
                  shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all URLs below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
As we add new column for Average Author feedback, we add corresponding Rspec test in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the testing process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews in  review_mapping_spec.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls is 24.272% for whole expertiza.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Select the Assignment you want to further check, for example, Final project (and design doc) &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column, for example, student5061 have reviewed Team_BEND_Final_Project and his Average Feedback Score is 13 of total score 15.&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;, for example, student5698 have reviewed Final project(and design doc)_Team_113, and there is a URL about reactkungfu in his review&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain &lt;br /&gt;
* Jing Cai &lt;br /&gt;
* Yongjian Zhu &lt;br /&gt;
* Weiran Fu &lt;br /&gt;
* Dongyuan Wang &lt;br /&gt;
&lt;br /&gt;
== ''' Related Links ''' ==&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1628 pull request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=kTEgNyljAd8 screencast video]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130869</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130869"/>
		<updated>2019-12-07T03:36:59Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Code Changes  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File: UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view.  &lt;br /&gt;
&lt;br /&gt;
As we found that the links and files in review are both stored as URLs, so we only need to list url in reviews. &lt;br /&gt;
&lt;br /&gt;
So We change following methods. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that &lt;br /&gt;
                  shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all URLs below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
As we add new column for Average Author feedback, we add corresponding Rspec test in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the testing process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews in  review_mapping_spec.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls is 24.272% for whole expertiza.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Select the Assignment you want to further check, for example, Final project (and design doc) &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column, for example, student5061 have reviewed Team_BEND_Final_Project and his Average Feedback Score is 13 of total score 15.&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;, for example, student5698 have reviewed Final project(and design doc)_Team_113, and there is a URL about reactkungfu in his review&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain &lt;br /&gt;
* Jing Cai &lt;br /&gt;
* Yongjian Zhu &lt;br /&gt;
* Weiran Fu &lt;br /&gt;
* Dongyuan Wang &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1628 pull request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=kTEgNyljAd8 screencast video]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130723</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130723"/>
		<updated>2019-12-07T02:05:44Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Controller Improvement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File: UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view.  &lt;br /&gt;
&lt;br /&gt;
As we found that the links and files in review are both stored as URLs, so we only need to list url in reviews. &lt;br /&gt;
&lt;br /&gt;
So We change following methods. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that &lt;br /&gt;
                  shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
As we add new column for Average Author feedback, we add corresponding Rspec test in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the testing process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews in  review_mapping_spec.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls is 24.272% for whole expertiza.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Select the Assignment you want to further check, for example, Final project (and design doc) &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column, for example, student5061 have reviewed Team_BEND_Final_Project and his Average Feedback Score is 13 of total score 15.&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;, for example, student5698 have reviewed Final project(and design doc)_Team_113, and there is a URL about reactkungfu in his review&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain &lt;br /&gt;
* Jing Cai &lt;br /&gt;
* Yongjian Zhu &lt;br /&gt;
* Weiran Fu &lt;br /&gt;
* Dongyuan Wang &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1628 pull request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=kTEgNyljAd8 screencast video]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130722</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130722"/>
		<updated>2019-12-07T02:05:36Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Controller Improvement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File: UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view.  As we found that the links and files in review are both stored as URLs, so we only need to list url in reviews. &lt;br /&gt;
&lt;br /&gt;
So We change following methods. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that &lt;br /&gt;
                  shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
As we add new column for Average Author feedback, we add corresponding Rspec test in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the testing process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews in  review_mapping_spec.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls is 24.272% for whole expertiza.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Select the Assignment you want to further check, for example, Final project (and design doc) &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column, for example, student5061 have reviewed Team_BEND_Final_Project and his Average Feedback Score is 13 of total score 15.&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;, for example, student5698 have reviewed Final project(and design doc)_Team_113, and there is a URL about reactkungfu in his review&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain &lt;br /&gt;
* Jing Cai &lt;br /&gt;
* Yongjian Zhu &lt;br /&gt;
* Weiran Fu &lt;br /&gt;
* Dongyuan Wang &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1628 pull request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=kTEgNyljAd8 screencast video]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130714</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130714"/>
		<updated>2019-12-07T02:00:49Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Related Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File: UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that &lt;br /&gt;
                  shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
As we add new column for Average Author feedback, we add corresponding Rspec test in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the testing process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews in  review_mapping_spec.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls is 24.272% for whole expertiza.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Select the Assignment you want to further check, for example, Final project (and design doc) &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column, for example, student5061 have reviewed Team_BEND_Final_Project and his Average Feedback Score is 13 of total score 15.&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;, for example, student5698 have reviewed Final project(and design doc)_Team_113, and there is a URL about reactkungfu in his review&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain &lt;br /&gt;
* Jing Cai &lt;br /&gt;
* Yongjian Zhu &lt;br /&gt;
* Weiran Fu &lt;br /&gt;
* Dongyuan Wang &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1628 pull request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=kTEgNyljAd8 screencast video]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130615</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130615"/>
		<updated>2019-12-07T01:17:35Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Team Information  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File: UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that &lt;br /&gt;
                  shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
As we add new column for Average Author feedback, we add corresponding Rspec test in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the testing process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews in  review_mapping_spec.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls is 24.272% for whole expertiza.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Select the Assignment you want to further check, for example, Final project (and design doc) &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column, for example, student5061 have reviewed Team_BEND_Final_Project and his Average Feedback Score is 13 of total score 15.&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;, for example, student5698 have reviewed Final project(and design doc)_Team_113, and there is a URL about reactkungfu in his review&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain &lt;br /&gt;
* Jing Cai &lt;br /&gt;
* Yongjian Zhu &lt;br /&gt;
* Weiran Fu &lt;br /&gt;
* Dongyuan Wang &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1628 pull request]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:E1979_test_result.png&amp;diff=130612</id>
		<title>File:E1979 test result.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:E1979_test_result.png&amp;diff=130612"/>
		<updated>2019-12-07T01:16:46Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: uploaded a new version of &amp;amp;quot;File:E1979 test result.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130598</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130598"/>
		<updated>2019-12-07T01:06:54Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Related Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File: UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that &lt;br /&gt;
                  shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
As we add new column for Average Author feedback, we add corresponding Rspec test in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the testing process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews in  review_mapping_spec.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls is 24.272% for whole expertiza.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Select the Assignment you want to further check, for example, Final project (and design doc) &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column, for example, student5061 have reviewed Team_BEND_Final_Project and his Average Feedback Score is 13 of total score 15.&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;, for example, student5698 have reviewed Final project(and design doc)_Team_113, and there is a URL about reactkungfu in his review&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/1628 pull request]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:UML_flow_chart.png&amp;diff=130571</id>
		<title>File:UML flow chart.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:UML_flow_chart.png&amp;diff=130571"/>
		<updated>2019-12-07T00:49:27Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: uploaded a new version of &amp;amp;quot;File:UML flow chart.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130568</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130568"/>
		<updated>2019-12-07T00:46:36Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Project Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File: UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that &lt;br /&gt;
                  shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
As we add new column for Average Author feedback, we add corresponding Rspec test in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the testing process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews in  review_mapping_spec.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls is 24.272% for whole expertiza.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Select the Assignment you want to further check, for example, Final project (and design doc) &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column, for example, student5061 have reviewed Team_BEND_Final_Project and his Average Feedback Score is 13 of total score 15.&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;, for example, student5698 have reviewed Final project(and design doc)_Team_113, and there is a URL about reactkungfu in his review&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:UML_flow_chart.png&amp;diff=130563</id>
		<title>File:UML flow chart.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:UML_flow_chart.png&amp;diff=130563"/>
		<updated>2019-12-07T00:45:13Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: uploaded a new version of &amp;amp;quot;File:UML flow chart.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130557</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130557"/>
		<updated>2019-12-07T00:40:56Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Automated Testing Using Rspec */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that &lt;br /&gt;
                  shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
&lt;br /&gt;
As we add new column for Average Author feedback, we add corresponding Rspec test in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the testing process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews in  review_mapping_spec.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls is 24.272% for whole expertiza.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Select the Assignment you want to further check, for example, Final project (and design doc) &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column, for example, student5061 have reviewed Team_BEND_Final_Project and his Average Feedback Score is 13 of total score 15.&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;, for example, student5698 have reviewed Final project(and design doc)_Team_113, and there is a URL about reactkungfu in his review&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130553</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130553"/>
		<updated>2019-12-07T00:36:51Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Automated Testing Using Rspec */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': &lt;br /&gt;
&lt;br /&gt;
As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# '''View logic''': &lt;br /&gt;
&lt;br /&gt;
We added Rspec tests in review_mapping_spec.rb which tests average feedback score column.&lt;br /&gt;
During the coding process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls is 24.272% for whole expertiza.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Select the Assignment you want to further check, for example, Final project (and design doc) &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column, for example, student5061 have reviewed Team_BEND_Final_Project and his Average Feedback Score is 13 of total score 15.&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;, for example, student5698 have reviewed Final project(and design doc)_Team_113, and there is a URL about reactkungfu in his review&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130551</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130551"/>
		<updated>2019-12-07T00:35:46Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Manual UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': &lt;br /&gt;
&lt;br /&gt;
As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# '''View logic''': &lt;br /&gt;
&lt;br /&gt;
We added Rspec tests in review_mapping_spec.rb which tests average feedback score column.&lt;br /&gt;
During the coding process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls is 24.272% for whole expertiza.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Select the Assignment you want to further check, for example, Final project (and design doc) &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column, for example, student5061 have reviewed Team_BEND_Final_Project and his Average Feedback Score is 13 of total score 15.&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;, for example, student5698 have reviewed Final project(and design doc)_Team_113, and there is a URL about reactkungfu in his review&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130546</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130546"/>
		<updated>2019-12-07T00:29:18Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Coverage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': &lt;br /&gt;
&lt;br /&gt;
As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# '''View logic''': &lt;br /&gt;
&lt;br /&gt;
We added Rspec tests in review_mapping_spec.rb which tests average feedback score column.&lt;br /&gt;
During the coding process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls is 24.272% for whole expertiza.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130543</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130543"/>
		<updated>2019-12-07T00:26:18Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Test Plan  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': &lt;br /&gt;
&lt;br /&gt;
As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
describe &amp;quot;Test assignment review report&amp;quot; do&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:instructor)&lt;br /&gt;
    create(:assignment, course: nil, name: 'Test Assignment')&lt;br /&gt;
    assignment_id = Assignment.where(name: 'Test Assignment')[0].id&lt;br /&gt;
    login_as 'instructor6'&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{assignment_id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it 'should contain Average Author feedback' do&lt;br /&gt;
    create(:review_response_map)&lt;br /&gt;
    expect(page).to have_content('Average Author feedback')&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# '''View logic''': &lt;br /&gt;
&lt;br /&gt;
We added Rspec tests in review_mapping_spec.rb which tests average feedback score column.&lt;br /&gt;
During the coding process, we found that there are no tests for other columns as well.&lt;br /&gt;
So we also add some tests for number of reviews completed, length of reviews and summary of reviews.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  it &amp;quot;should calculate number of reviews correctly&amp;quot; do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('0/2')&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;can show length of reviews&amp;quot;, js: true do&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;submission&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    create(:assignment_due_date, deadline_type: DeadlineType.where(name: &amp;quot;review&amp;quot;).first, due_at: DateTime.now.in_time_zone + 1.day)&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # assign 2 reviews to student 4&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=1&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/select_reviewer?contributor_id=3&amp;amp;id=1&amp;quot;&lt;br /&gt;
    add_reviewer(&amp;quot;student4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # it should find there is a chart in the view that shows the review length&lt;br /&gt;
    expect(page).to have_selector(&amp;quot;#chart-0&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  it &amp;quot;can show summary&amp;quot; do&lt;br /&gt;
    participant_reviewer = create :participant, assignment: @assignment&lt;br /&gt;
    participant_reviewer2 = create :participant, assignment: @assignment&lt;br /&gt;
    login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
    visit &amp;quot;/review_mapping/list_mappings?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # add_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer.user.name&lt;br /&gt;
&lt;br /&gt;
    # add_meta_reviewer&lt;br /&gt;
    first(:link, 'add reviewer').click&lt;br /&gt;
    add_reviewer(participant_reviewer.user.name)&lt;br /&gt;
    click_link('add metareviewer')&lt;br /&gt;
    add_matareviewer(participant_reviewer2.user.name)&lt;br /&gt;
    expect(page).to have_content participant_reviewer2.user.name&lt;br /&gt;
&lt;br /&gt;
    visit &amp;quot;/reports/response_report?id=#{@assignment.id}&amp;quot;&lt;br /&gt;
    click_button &amp;quot;View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    expect(page).to have_content('summary')&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130526</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130526"/>
		<updated>2019-12-07T00:16:21Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Automated Testing Using Rspec */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': &lt;br /&gt;
&lt;br /&gt;
As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130525</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130525"/>
		<updated>2019-12-07T00:16:01Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Code Changes  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130524</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130524"/>
		<updated>2019-12-07T00:15:50Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Code Changes  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
'''4. review_mapping_spec.rb '''&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130520</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130520"/>
		<updated>2019-12-07T00:13:28Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Code Changes  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
&lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130519</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130519"/>
		<updated>2019-12-07T00:12:44Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Problem Statement  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: Feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Feedback_task.png&amp;diff=130517</id>
		<title>File:Feedback task.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Feedback_task.png&amp;diff=130517"/>
		<updated>2019-12-07T00:12:06Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: uploaded a new version of &amp;amp;quot;File:Feedback task.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130514</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130514"/>
		<updated>2019-12-07T00:09:46Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Problem Statement  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130513</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130513"/>
		<updated>2019-12-07T00:09:12Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Problem Statement  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File: feedbackk_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130511</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130511"/>
		<updated>2019-12-07T00:08:47Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Problem Statement  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feadback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130506</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130506"/>
		<updated>2019-12-07T00:06:55Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Problem Statement  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:E1979_task1.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130505</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130505"/>
		<updated>2019-12-07T00:06:07Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Problem Statement  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:E1979_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Feedback_task.png&amp;diff=130504</id>
		<title>File:Feedback task.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Feedback_task.png&amp;diff=130504"/>
		<updated>2019-12-07T00:05:01Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: uploaded a new version of &amp;amp;quot;File:Feedback task.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Feedback_task.png&amp;diff=130503</id>
		<title>File:Feedback task.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Feedback_task.png&amp;diff=130503"/>
		<updated>2019-12-07T00:04:23Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: uploaded a new version of &amp;amp;quot;File:Feedback task.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130495</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130495"/>
		<updated>2019-12-06T23:59:08Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Problem Statement  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews and visualization of length of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Fix code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130491</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130491"/>
		<updated>2019-12-06T23:56:56Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* View Improvement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130490</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130490"/>
		<updated>2019-12-06T23:56:40Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Current Implementation  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130487</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130487"/>
		<updated>2019-12-06T23:54:41Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Controller Improvement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method. Specify changes will be shown in File Change.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:E1979_test_result.png&amp;diff=130474</id>
		<title>File:E1979 test result.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:E1979_test_result.png&amp;diff=130474"/>
		<updated>2019-12-06T23:47:20Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: uploaded a new version of &amp;amp;quot;File:E1979 test result.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:E1979_test_result.png&amp;diff=130473</id>
		<title>File:E1979 test result.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:E1979_test_result.png&amp;diff=130473"/>
		<updated>2019-12-06T23:46:11Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: uploaded a new version of &amp;amp;quot;File:E1979 test result.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130100</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130100"/>
		<updated>2019-12-06T19:00:21Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Manual UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
[[File:E1979_test_result.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:E1979_test_result.png&amp;diff=130098</id>
		<title>File:E1979 test result.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:E1979_test_result.png&amp;diff=130098"/>
		<updated>2019-12-06T18:59:53Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130097</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130097"/>
		<updated>2019-12-06T18:59:08Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Manual UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be same as below.&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130094</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130094"/>
		<updated>2019-12-06T18:55:52Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Manual UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# Check &amp;quot;Average Feedback Score&amp;quot; column&lt;br /&gt;
# Check urls below each &amp;quot;Team reviewed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The anticipated result can be showed as below.&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130093</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130093"/>
		<updated>2019-12-06T18:53:08Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Automated Testing Using Rspec */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# '''Controller logic''': As we change two methods, we created corresponding tests for them in review_mapping_helper_spec.rb.&lt;br /&gt;
# '''View logic''': We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# See whether new fields are shown.&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130092</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130092"/>
		<updated>2019-12-06T18:40:13Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Code Changes  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.  &lt;br /&gt;
'''1. _review_report.html.erb'''  &lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''  &lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.  &lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''  &lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# We plan to test the response report page (/review_mapping/response_report?id={:assignmentID}) to make sure the new field (feedback, file and chart) exists.&lt;br /&gt;
# We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# See whether new fields are shown.&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2018/E1876_Completion/Progress_view&amp;diff=130091</id>
		<title>CSC/ECE 517 Fall 2018/E1876 Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2018/E1876_Completion/Progress_view&amp;diff=130091"/>
		<updated>2019-12-06T18:39:39Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Controller-level Logic */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Problem Statement'''=&lt;br /&gt;
A key component of Expertiza is peer reviews, which provide feedback to authors so that they can improve their work. Expertiza also supports grading of these reviews to ensure students write quality reviews, helping them learn more about the assignment by looking at their peers' work. In addition, Expertiza allows for metareviews, which are reviews the authors of the original work write for the reviews of their original work. This author feedback is useful for grading the reviews because it indicates how helpful this review was to the authors of the original work. The objective of this project is to add metareview or author feedback information to the review report page, which shows a summary of all the reviews written by the students for an assignment.&lt;br /&gt;
&lt;br /&gt;
='''Goal'''=&lt;br /&gt;
&lt;br /&gt;
The aim of this project is to build this into the system. We need an additional column in the 'Review Report' page for reviews which shows the calculation of the author feedback. This will help instructor's to know how the reviews proved useful to the authors/team. The aim of this project is to integrate the author feedback column in the summary page&lt;br /&gt;
&lt;br /&gt;
='''Design'''=&lt;br /&gt;
&lt;br /&gt;
== User Interface Enhancements ==&lt;br /&gt;
&lt;br /&gt;
In the page &amp;quot;Review report for Design exercise&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.), we are planning to add one more column to show the average ratings for the author feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. Below is the page we are planning to edit.&lt;br /&gt;
&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
== Controller-level Logic ==&lt;br /&gt;
&lt;br /&gt;
The following method shows the code logic we are planning to write for calculating the average scores for the feedback given by authors for the reviews of their work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
 def calculate_avg_score_by_feedback(question_answers, q_max_score)&lt;br /&gt;
      # get score and summary of answers for each question&lt;br /&gt;
      # only include divide the valid_answer_sum with the number of valid answers&lt;br /&gt;
&lt;br /&gt;
      valid_answer_counter = 0&lt;br /&gt;
      question_score = 0.0&lt;br /&gt;
      question_answers.each do |ans|&lt;br /&gt;
        # calculate score per question&lt;br /&gt;
        unless ans.answer.nil?&lt;br /&gt;
          question_score += ans.answer&lt;br /&gt;
          valid_answer_counter += 1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      if valid_answer_counter &amp;gt; 0 and q_max_score &amp;gt; 0&lt;br /&gt;
        # convert the score in percentage&lt;br /&gt;
        question_score /= (valid_answer_counter * q_max_score)&lt;br /&gt;
        question_score = question_score.round(2) * 100&lt;br /&gt;
      end&lt;br /&gt;
      question_score&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Relevant Database Tables ==&lt;br /&gt;
&lt;br /&gt;
The following are the table structures we will need for this feature. First, the questions table has all the questions based on the questionnaire. We will be only concerned with the questions in the feedback questionnaire. The answers for each question in the feedback questionnaire are saved in the Answers table below based on the Question ID. Now, in order to know if the answer is a feedback by team members or a review by reviewer, the mapping for the Answers table is done by the response_id which is a foreign key to the Response table. This Response table gives us the map_id which maps to a response map table. Now, the response map table gives us information on the reviewer_id, reviewee_id, reviewed_object_id (which is the ID for the assignment being reviewed) and the type (whether it's a teammate review, author feedback, a regular review, etc.). We will have to fetch the answers from the Answer table based on response_id because in our case, the response is from a previous reviewee and not a reviewer. So, we will fetch those answers whose response type is FeedbackResponseMap and calculate scores for those questions for the corresponding ReviewScores table. Below are excerpts from the [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza database documentation] which describe the database tables relevant to our design.&lt;br /&gt;
&lt;br /&gt;
=== Questions Table Structure ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Questions page already exists,so created a page with the name Questions table and gave an external link on the tables page--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
!Field Name !!Type !!Description &lt;br /&gt;
|-&lt;br /&gt;
!id &lt;br /&gt;
|int(11)  &lt;br /&gt;
|unique identifier for the record&lt;br /&gt;
|- &lt;br /&gt;
!txt   &lt;br /&gt;
|text  &lt;br /&gt;
|the question string&lt;br /&gt;
|- &lt;br /&gt;
!weight   &lt;br /&gt;
|int(11)  &lt;br /&gt;
|specifies the weighting of the question&lt;br /&gt;
|- &lt;br /&gt;
!questionnaire_id   &lt;br /&gt;
|int(11)&lt;br /&gt;
|the id of the questionnaire that this question belongs to&lt;br /&gt;
|-&lt;br /&gt;
!seq&lt;br /&gt;
|DECIMAL&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!type&lt;br /&gt;
|VARCHAR(255)&lt;br /&gt;
|Type of question&lt;br /&gt;
|-&lt;br /&gt;
!size&lt;br /&gt;
|VARCHAR(255)&lt;br /&gt;
|Size of the question&lt;br /&gt;
|-&lt;br /&gt;
!alternatives&lt;br /&gt;
|VARCHAR(255)&lt;br /&gt;
|Other question which means the same&lt;br /&gt;
|-&lt;br /&gt;
!break_before&lt;br /&gt;
|BIT&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!max_label&lt;br /&gt;
|VARCHAR(255)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!min_label&lt;br /&gt;
|VARCHAR(255)&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Answer Table Structure ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
!Field Name !!Type !!Description &lt;br /&gt;
|- &lt;br /&gt;
!id   &lt;br /&gt;
|int(11)  &lt;br /&gt;
|Unique ID for each Answers record.&lt;br /&gt;
|- &lt;br /&gt;
!question_id   &lt;br /&gt;
|int(11) &lt;br /&gt;
|ID of Question.&lt;br /&gt;
|- &lt;br /&gt;
!answer   &lt;br /&gt;
|int(11)  &lt;br /&gt;
|Value of each of the answer.&lt;br /&gt;
|- &lt;br /&gt;
!comments  &lt;br /&gt;
|text  &lt;br /&gt;
|Comment given to the answer.&lt;br /&gt;
|- &lt;br /&gt;
!reponse_id   &lt;br /&gt;
|int(11) &lt;br /&gt;
|ID of the response associated with this Answer.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response Table Structure ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
!Field Name !!Type !!Description &lt;br /&gt;
|-&lt;br /&gt;
!id&lt;br /&gt;
|int(11)&lt;br /&gt;
|The unique record id&lt;br /&gt;
|-&lt;br /&gt;
!map_id&lt;br /&gt;
|int(11)&lt;br /&gt;
|The ID of the [[response_maps|response map]] defining the relationship that this response applies to&lt;br /&gt;
|-&lt;br /&gt;
!additional_comment&lt;br /&gt;
|text&lt;br /&gt;
|An additional comment provided by the reviewer to support his/her response&lt;br /&gt;
|-&lt;br /&gt;
!updated_at&lt;br /&gt;
|datetime&lt;br /&gt;
|The timestamp indicating when this response was last modified&lt;br /&gt;
|-&lt;br /&gt;
!created_at&lt;br /&gt;
|datetime&lt;br /&gt;
|The timestamp indicating when this response was created&lt;br /&gt;
|-&lt;br /&gt;
!version_num&lt;br /&gt;
|int(11)&lt;br /&gt;
|The version of the review.&lt;br /&gt;
|-&lt;br /&gt;
!round&lt;br /&gt;
|int(11)&lt;br /&gt;
|The round the review is connected to. &lt;br /&gt;
|-&lt;br /&gt;
!is_submitted&lt;br /&gt;
|tinyint(1)&lt;br /&gt;
|Boolean Field to indicate whether the review is submitted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Response Map Table ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
!Field Name !!Type !!Description &lt;br /&gt;
|-&lt;br /&gt;
!id&lt;br /&gt;
|int(11)&lt;br /&gt;
|The unique record id&lt;br /&gt;
|- &lt;br /&gt;
!reviewed_object_id&lt;br /&gt;
|int(11)&lt;br /&gt;
|The object being reviewed in the [[responses|response]]. Possible objects include other ResponseMaps or [[assignments]]&lt;br /&gt;
|-&lt;br /&gt;
!reviewer_id&lt;br /&gt;
|int(11)&lt;br /&gt;
|The [[participants|participant]] (actually AssignmentParticipant) providing the response&lt;br /&gt;
|-&lt;br /&gt;
!reviewee_id&lt;br /&gt;
|int(11)&lt;br /&gt;
|The [[teams|team]] (AssignmentTeam) receiving the response&lt;br /&gt;
|-&lt;br /&gt;
!type&lt;br /&gt;
|varchar(255)&lt;br /&gt;
|Used for subclassing the response map. Available subclasses are ReviewResponseMap, MetareviewResponseMap, FeedbackResponseMap, TeammateReviewResponseMap  &lt;br /&gt;
|-&lt;br /&gt;
!created_at&lt;br /&gt;
|DATETIME&lt;br /&gt;
|Date and Time for when the record was created&lt;br /&gt;
|-&lt;br /&gt;
!updated_at&lt;br /&gt;
|DATETIME&lt;br /&gt;
|Date and Time when the last update was made&lt;br /&gt;
|-&lt;br /&gt;
!calibrate_to&lt;br /&gt;
|BIT&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== UML Flow-Chart ==&lt;br /&gt;
&lt;br /&gt;
[[File:UML-progress.png]]&lt;br /&gt;
&lt;br /&gt;
== Files That Will be Changed ==&lt;br /&gt;
&lt;br /&gt;
1. To calculate the average author feedback score: https://github.com/jainmohit1/expertiza/blob/master/app/models/on_the_fly_calc.rb&lt;br /&gt;
&lt;br /&gt;
2. To populate the average author feedback score for the view: https://github.com/jainmohit1/expertiza/blob/master/app/controllers/review_mapping_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. To add a field in the view: https://github.com/jainmohit1/expertiza/blob/master/app/views/review_mapping/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
4. To add a field in the partial : https://github.com/jainmohit1/expertiza/blob/master/app/views/review_mapping/_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
5. To add a field in the partial:  https://github.com/jainmohit1/expertiza/blob/master/app/views/review_mapping/_team_score.html.erb&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
&lt;br /&gt;
We added functionality in the on_the_fly_calc.rb file in Models. The methods in consideration are:&amp;lt;br&amp;gt;&lt;br /&gt;
1. compute_author_feedback_scores&amp;lt;br&amp;gt;&lt;br /&gt;
2. calc_avg_feedback_score(response)&amp;lt;br&amp;gt;&lt;br /&gt;
3. calc_feedback_scores_sum&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first method fetches the Feedback Response from ResponseMaps table based on the responses given earlier. Responses means the reviews given. Each feedback is saved to ResponseMap table with type = 'FeedbackResponseMap'. The feedback is fetched according to the assignment id, the reviewer who gave the review for that assignment and the reviews in each round. For each feedback response, we get the weight of the answer(feedback) submitted by author from Answer table and the weight of each answer from Questions table for the FeedbackQuestionnaire in consideration which we fetched from Questionnaire table. We calculate by taking an average of all feedbacks given by all team members to the reviews that they got. Following is the code snippet:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
def compute_author_feedback_scores&lt;br /&gt;
    @author_feedback_scores = {}&lt;br /&gt;
    @response_maps = ResponseMap.where('reviewed_object_id = ? &amp;amp;&amp;amp; type = ?', self.id, 'ReviewResponseMap')&lt;br /&gt;
    rounds = self.rounds_of_reviews&lt;br /&gt;
    (1..rounds).each do |round|&lt;br /&gt;
      @response_maps.each do |response_map|&lt;br /&gt;
        response = Response.where('map_id = ?', response_map.id)&lt;br /&gt;
        response = response.select {|response| response.round == round }&lt;br /&gt;
        @round = round&lt;br /&gt;
        @response_map = response_map&lt;br /&gt;
        calc_avg_feedback_score(response) unless response.empty?&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    @author_feedback_scores&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
def calc_avg_feedback_score(response)&lt;br /&gt;
  # Retrieve the author feedback response maps for the teammates reviewing the review of their work.&lt;br /&gt;
  author_feedback_response_maps = ResponseMap.where('reviewed_object_id = ? &amp;amp;&amp;amp; type = ?', response.first.id, 'FeedbackResponseMap')&lt;br /&gt;
  author_feedback_response_maps.each do |author_feedback_response_map|&lt;br /&gt;
    @corresponding_response = Response.where('map_id = ?', author_feedback_response_map.id)&lt;br /&gt;
    next if @corresponding_response.empty?&lt;br /&gt;
    calc_feedback_scores_sum&lt;br /&gt;
  end&lt;br /&gt;
  # Divide the sum of the author feedback scores for this review by their number to get the&lt;br /&gt;
  # average.&lt;br /&gt;
&lt;br /&gt;
  if !@author_feedback_scores[@response_map.reviewer_id].nil? &amp;amp;&amp;amp;&lt;br /&gt;
      !@author_feedback_scores[@response_map.reviewer_id][@round].nil? &amp;amp;&amp;amp;&lt;br /&gt;
      !@author_feedback_scores[@response_map.reviewer_id][@round][@response_map.reviewee_id].nil? &amp;amp;&amp;amp;&lt;br /&gt;
      !author_feedback_response_maps.empty?&lt;br /&gt;
    @author_feedback_scores[@response_map.reviewer_id][@round][@response_map.reviewee_id] /= author_feedback_response_maps.count&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
def calc_feedback_scores_sum&lt;br /&gt;
  @respective_scores = {}&lt;br /&gt;
  if !@author_feedback_scores[@response_map.reviewer_id].nil? &amp;amp;&amp;amp; !@author_feedback_scores[@response_map.reviewer_id][@round].nil?&lt;br /&gt;
    @respective_scores = @author_feedback_scores[@response_map.reviewer_id][@round]&lt;br /&gt;
  end&lt;br /&gt;
  author_feedback_questionnaire_id = feedback_questionnaire_id(@corresponding_response)&lt;br /&gt;
  @questions = Question.where('questionnaire_id = ?', author_feedback_questionnaire_id)&lt;br /&gt;
  # Calculate the score of the author feedback review.&lt;br /&gt;
  calc_review_score&lt;br /&gt;
  # Compute the sum of the author feedback scores for this review.&lt;br /&gt;
  @respective_scores[@response_map.reviewee_id] = 0 if @respective_scores[@response_map.reviewee_id].nil?&lt;br /&gt;
  @respective_scores[@response_map.reviewee_id] += @this_review_score&lt;br /&gt;
  # The reviewer is the metareviewee whose review the authors or teammates are reviewing.&lt;br /&gt;
  @author_feedback_scores[@response_map.reviewer_id] = {} if @author_feedback_scores[@response_map.reviewer_id].nil?&lt;br /&gt;
  @author_feedback_scores[@response_map.reviewer_id][@round] = {} if @author_feedback_scores[@response_map.reviewer_id][@round].nil?&lt;br /&gt;
  @author_feedback_scores[@response_map.reviewer_id][@round] = @respective_scores&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== View ==&lt;br /&gt;
&lt;br /&gt;
We added another column to show the average author feedback score for each student who reviewed and for each team the student reviewed. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;td align = 'left' &amp;gt;&lt;br /&gt;
          &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
            &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
                &amp;lt;%@team = Team.find(ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                &amp;lt;%= render partial: 'team_feedback_score',  locals: {bgcolor: @bgcolor, team_id: @team.id, reviewer_id: r.id} %&amp;gt;&lt;br /&gt;
            &amp;lt;%end %&amp;gt;&lt;br /&gt;
          &amp;lt;%end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Test Plan =&lt;br /&gt;
We plan to test the response report page (/review_mapping/response_report?id={:assignmentID}) to make sure the new field (average author feedback) exists.&lt;br /&gt;
&lt;br /&gt;
Using [http://rspec.info/ RSpec] we will add a test case to review_mapping_controller_spec.rb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    context 'when type is FeedbackResponseMap' do&lt;br /&gt;
      context 'when assignment has author feedback feature' do&lt;br /&gt;
        it 'renders response_report page with average author feedback data' do&lt;br /&gt;
          allow(assignment).to receive(:varying_rubrics_by_round?).and_return(true)&lt;br /&gt;
          allow(FeedbackResponseMap).to receive(:feedback_response_report).with('1', 'FeedbackResponseMap')&lt;br /&gt;
                                                                          .and_return([participant, participant1], [1, 2], [3, 4], [])&lt;br /&gt;
          params = {&lt;br /&gt;
            id: 1,&lt;br /&gt;
            report: {type: 'FeedbackResponseMap'},&lt;br /&gt;
          }&lt;br /&gt;
          get :response_report, params&lt;br /&gt;
          expect(response).to render_template(:response_report)&lt;br /&gt;
          expect(response).to have(:avg_author_feedback)&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also plan to manually test the response report page to make sure the new field is aligning well in the UI in the expected place. We will attach the screenshot of the UI as the test result. We will test the cases of one and multiple reviews by a reviewer and verify the number and average scores of the metareviews for those reviews are rendered correctly.&lt;br /&gt;
 &lt;br /&gt;
== Review Report Page ==&lt;br /&gt;
 &lt;br /&gt;
Below is the screenshot of review report page which now shows a new column for Author Feedback Score. &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:impl_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Implementation ==&lt;br /&gt;
&lt;br /&gt;
We added a rspec test in on_the_fly_calc_spec.rb which tests our method: 'compute_author_feedback_scores' that calculates the average feedback score. Below is the snippet:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe '#compute_author_feedback_score' do&lt;br /&gt;
    let(:reviewer) { build(:participant, id: 1) }&lt;br /&gt;
    let(:feedback) { Answer.new(answer: 2, response_id: 1, comments: 'Feedback Text', question_id: 2) }&lt;br /&gt;
    let(:feedback_question) { build(:question, questionnaire: questionnaire2, weight: 1, id: 2) }&lt;br /&gt;
    let(:questionnaire2) { build(:questionnaire, name: &amp;quot;feedback&amp;quot;, private: 0, min_question_score: 0, max_question_score: 10, instructor_id: 1234) }&lt;br /&gt;
    let(:reviewer1) { build(:participant, id: 2) }&lt;br /&gt;
    let score = {}&lt;br /&gt;
    let(:team_user) { build(:team_user, team: 2, user: 2) }&lt;br /&gt;
    let(:feedback_response) { build(:response, id: 2, map_id: 2, scores: [feedback]) }&lt;br /&gt;
    let(:feedback_response_map) { build(:response_map, id: 2, reviewed_object_id: 1, reviewer_id: 2, reviewee_id: 1) }&lt;br /&gt;
&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(on_the_fly_calc).to receive(:rounds_of_reviews).and_return(1)&lt;br /&gt;
      allow(on_the_fly_calc).to receive(:review_questionnaire_id).and_return(1)&lt;br /&gt;
    end&lt;br /&gt;
    context 'verifies feedback score' do&lt;br /&gt;
      it 'computes feedback score based on reviews' do&lt;br /&gt;
        expect(assignment.compute_author_feedback_scores).to eq(score)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Project Walk-through =&lt;br /&gt;
https://www.youtube.com/watch?v=14bx6vD3dOE&amp;amp;feature=youtu.be&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
1. http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables&lt;br /&gt;
&lt;br /&gt;
2. https://github.com/jainmohit1/expertiza&lt;br /&gt;
&lt;br /&gt;
3. https://github.com/expertiza/expertiza/pull/1290&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130090</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130090"/>
		<updated>2019-12-06T18:38:41Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Code Changes  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.&lt;br /&gt;
'''1. _review_report.html.erb'''&lt;br /&gt;
We add a new column to show average score of feedback score.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
'''2. review_mapping_helper.rb'''&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. review_mapping_helper_spec.rb'''&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# We plan to test the response report page (/review_mapping/response_report?id={:assignmentID}) to make sure the new field (feedback, file and chart) exists.&lt;br /&gt;
# We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# See whether new fields are shown.&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130089</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130089"/>
		<updated>2019-12-06T18:37:53Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Code Changes  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.&lt;br /&gt;
# _review_report.html.erb&lt;br /&gt;
We add a new column to show average score of feedback score&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;!--Author feedback--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd required to add a &amp;quot;author feedback&amp;quot; column that shows the average score the reviewers received from the authors. In this case, she can see all the data on a single screen.--&amp;gt;&lt;br /&gt;
                &amp;lt;!--Dr.Kidd's course--&amp;gt;&lt;br /&gt;
          &amp;lt;td align='left'&amp;gt;&lt;br /&gt;
           &amp;lt;% @response_maps.each_with_index do |ri, index| %&amp;gt;&lt;br /&gt;
           &amp;lt;% if Team.where(id: ri.reviewee_id).length &amp;gt; 0 %&amp;gt;&lt;br /&gt;
              &amp;lt;% if index == 0 %&amp;gt;&lt;br /&gt;
                  &amp;lt;div&amp;gt;&lt;br /&gt;
              &amp;lt;% else %&amp;gt;&lt;br /&gt;
                  &amp;lt;div style=&amp;quot;border-top: solid; border-width: 1px;&amp;quot;&amp;gt;&lt;br /&gt;
              &amp;lt;% end %&amp;gt;&lt;br /&gt;
                    &amp;lt;%= calcutate_average_author_feedback_score(@assignment.id, @assignment.max_team_size, ri.id, ri.reviewee_id) %&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;% end %&amp;gt;&lt;br /&gt;
          &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we use new-added method to show all link below each Team name.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;!-- E1979: only list all url(start with http or https) in comments--&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls = list_url_in_comments(ri.id)%&amp;gt;&lt;br /&gt;
                  &amp;lt;/div&amp;gt;&lt;br /&gt;
                  &amp;lt;% if !urls.nil? %&amp;gt;&lt;br /&gt;
                    &amp;lt;% urls.each_with_index do |url| %&amp;gt;&lt;br /&gt;
                      &amp;lt;%= link_to url.to_s, url %&amp;gt;&lt;br /&gt;
                     &amp;lt;% end %&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;
# review_mapping_helper.rb&lt;br /&gt;
We first fix ''calcutate_average_author_feedback_score'' method.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  def calcutate_average_author_feedback_score(assignment_id, max_team_size, response_map_id, reviewee_id)&lt;br /&gt;
    review_response = ResponseMap.where(id: response_map_id).try(:first).try(:response).try(:last)&lt;br /&gt;
    author_feedback_avg_score = &amp;quot;-- / --&amp;quot;&lt;br /&gt;
    unless review_response.nil?&lt;br /&gt;
      # Total score of author feedback given by all team members. &lt;br /&gt;
      author_feedback_total_score = 0&lt;br /&gt;
      # Max score of author feedback&lt;br /&gt;
      author_feedback_max_score =  0&lt;br /&gt;
      # Number of author feedback given by all team members. &lt;br /&gt;
      author_feedback_count = 0&lt;br /&gt;
      # For each user in teamsUser find author feedback score.&lt;br /&gt;
      TeamsUser.where(team_id: reviewee_id).try(:each) do |teamsUser|&lt;br /&gt;
        user = teamsUser.try(:user)&lt;br /&gt;
        author = Participant.where(parent_id: assignment_id, user_id: user.id).try(:first) unless user.nil?&lt;br /&gt;
        feedback_response = ResponseMap.where(reviewed_object_id: review_response.id, reviewer_id: author.id).try(:first).try(:response).try(:last) unless author.nil?&lt;br /&gt;
        unless feedback_response.nil?&lt;br /&gt;
          author_feedback_total_score += feedback_response.total_score&lt;br /&gt;
          author_feedback_max_score = feedback_response.maximum_score&lt;br /&gt;
          author_feedback_count +=1&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      # return &amp;quot;-- / --&amp;quot; if no author feedback, otherwise return avg_score&lt;br /&gt;
      author_feedback_avg_score = author_feedback_count == 0 ? &amp;quot;-- / --&amp;quot; : &amp;quot;#{author_feedback_total_score/author_feedback_count} / #{author_feedback_max_score}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    author_feedback_avg_score&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add a new method called ''list_url_in_comments'' to shown all urls.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: black; border:1px;&amp;quot;&amp;gt;&lt;br /&gt;
  # E1979: Completion/Progress view changes&lt;br /&gt;
  # list all urls in comments for each review map&lt;br /&gt;
  def list_url_in_comments(response_map_id)&lt;br /&gt;
    response = Response.where(map_id: response_map_id)&lt;br /&gt;
    # find all comments in each repsonse&lt;br /&gt;
    Answer.where(response_id: response.ids).try(:each) do |ans|&lt;br /&gt;
      @comments = ''&lt;br /&gt;
      @comments += ans.try(:comments)&lt;br /&gt;
    end&lt;br /&gt;
    if @comments.nil?&lt;br /&gt;
      return @comments&lt;br /&gt;
    end&lt;br /&gt;
    urls = []&lt;br /&gt;
    # get every words in the comment&lt;br /&gt;
    words = @comments.split(&amp;quot; &amp;quot;)&lt;br /&gt;
    words.each do |element|&lt;br /&gt;
      # see if it starts with http or https&lt;br /&gt;
      if element =~ /https?:\/\/[\S]+/&lt;br /&gt;
        urls.append(element)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    urls&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# review_mapping_helper_spec.rb&lt;br /&gt;
Finally, we add some tests for the changes made. The specific test cases will be shown in Test Plan.&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# We plan to test the response report page (/review_mapping/response_report?id={:assignmentID}) to make sure the new field (feedback, file and chart) exists.&lt;br /&gt;
# We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# See whether new fields are shown.&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130088</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130088"/>
		<updated>2019-12-06T18:28:46Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Problem Statement  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column adjust to existing view.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.&lt;br /&gt;
# _review_report.html.erb&lt;br /&gt;
# review_mapping_helper.rb&lt;br /&gt;
# review_mapping_helper_spec.rb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# We plan to test the response report page (/review_mapping/response_report?id={:assignmentID}) to make sure the new field (feedback, file and chart) exists.&lt;br /&gt;
# We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# See whether new fields are shown.&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130087</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130087"/>
		<updated>2019-12-06T18:16:09Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Code Changes  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column toggleable.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.&lt;br /&gt;
# _review_report.html.erb&lt;br /&gt;
# review_mapping_helper.rb&lt;br /&gt;
# review_mapping_helper_spec.rb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# We plan to test the response report page (/review_mapping/response_report?id={:assignmentID}) to make sure the new field (feedback, file and chart) exists.&lt;br /&gt;
# We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# See whether new fields are shown.&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130086</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130086"/>
		<updated>2019-12-06T18:15:39Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /*  Code Changes  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column toggleable.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
Here is the file we have changed.&lt;br /&gt;
# _review_report.html.erb&lt;br /&gt;
# review_mapping_helper.rb&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# We plan to test the response report page (/review_mapping/response_report?id={:assignmentID}) to make sure the new field (feedback, file and chart) exists.&lt;br /&gt;
# We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# See whether new fields are shown.&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130085</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130085"/>
		<updated>2019-12-06T18:14:24Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Controller Improvement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column toggleable.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the data we need for view. We change following method.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
To do...&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# We plan to test the response report page (/review_mapping/response_report?id={:assignmentID}) to make sure the new field (feedback, file and chart) exists.&lt;br /&gt;
# We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# See whether new fields are shown.&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130084</id>
		<title>CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1979._Completion/Progress_view&amp;diff=130084"/>
		<updated>2019-12-06T18:13:29Z</updated>

		<summary type="html">&lt;p&gt;Jcai3: /* Controller Improvement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ''' Introduction ''' ==&lt;br /&gt;
* In Expertiza, peer reviews are used as a metric to evaluate someone’s project. Once someone has peer reviewed a project, the authors of the project can also provide feedback for this review, called “author feedback.” While grading peer reviews, it would be nice for the instructors to include the author feedback, since it shows how helpful the peer review actually was to the author of the project. &lt;br /&gt;
&lt;br /&gt;
== ''' Current Implementation ''' ==&lt;br /&gt;
* Currently, the instructor can only see several information, including numbers of review done, team the student which have reviewed,  about author feedback. The current view report can be shown as below.&lt;br /&gt;
[[File:Feedback_new.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* However, the instructor has no easy way of seeing the author-feedback scores, so it would be far too much trouble to include them in grades for reviewing.  &lt;br /&gt;
* So the aim of this project is to build more feedback information into the reviewer report. So that the instructor of the course is able to grade reviewers based on author feedback and review data.&lt;br /&gt;
&lt;br /&gt;
== ''' Problem Statement ''' ==&lt;br /&gt;
* We need to implement the integration of review performance which includes:&lt;br /&gt;
# # of reviews completed&lt;br /&gt;
# Length of reviews&lt;br /&gt;
# [Summary of reviews]&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
# An interactive visualization or table that showed this would be GREAT (We may use “HighChart” javascript library to do it.)&lt;br /&gt;
&lt;br /&gt;
* After analysis the current code, we found that the number of reviews, summary of reviews have already existed in the system. So we only need to finished the following tasks.&lt;br /&gt;
# Length of reviews (we can use HighChart to realize visualization)&lt;br /&gt;
# Whether reviewers added a file or link to their review&lt;br /&gt;
# The average ratings they received from the authors&lt;br /&gt;
&lt;br /&gt;
* As the description of our object, the average ratings part of this project has been done last year. And they add a new column (author feedback) to review report. But their functions still have some drawbacks. So we also need to improve the several functions of author feedback.&lt;br /&gt;
# Use the exist code to calculate the average score of feedback&lt;br /&gt;
# Make the author feedback column toggleable.&lt;br /&gt;
&lt;br /&gt;
* So here is our plan and solutions to finish this project.&lt;br /&gt;
[[File:feedback_task.png]]&lt;br /&gt;
&lt;br /&gt;
== ''' Project Design''' ==&lt;br /&gt;
The basic design of this project can be shown in the UML flow chart below.&lt;br /&gt;
&lt;br /&gt;
[[File:UML_flow_chart.png]]&lt;br /&gt;
&lt;br /&gt;
=== View Improvement ===&lt;br /&gt;
&lt;br /&gt;
* We decide mainly change the page of &amp;quot;Review report&amp;quot; (Log in as an instructor then go to Manage -&amp;gt; Assignments -&amp;gt; View review report.) from three aspects.&lt;br /&gt;
# We are planning to add one more column to show the average ratings for feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the &amp;quot;Score Awarded/Average Score&amp;quot; column. &lt;br /&gt;
# We are planning to improve the column of review length. Now it is just bare data and average data. We will make the review length into visualized chart by using “HighChart” javascript library. So that length of review will become more clear for instructors. The chart will be shown like below.&lt;br /&gt;
# We are planning to add all links which attached to their reviews below Team name. If there are links in the review, the links will be shown below.&lt;br /&gt;
[[File:Review_report_before.png]]&lt;br /&gt;
&lt;br /&gt;
=== Controller Improvement ===&lt;br /&gt;
&lt;br /&gt;
The Controller design is based on the date we need for view. We change following method.&lt;br /&gt;
# calcutate_average_author_feedback_score&lt;br /&gt;
# list_url_in_comments&lt;br /&gt;
&lt;br /&gt;
== ''' Code Changes ''' ==&lt;br /&gt;
To do...&lt;br /&gt;
&lt;br /&gt;
==  ''' Test Plan ''' ==&lt;br /&gt;
We will use unit test and functionally test with Rspec, and integration test by using TravisCI and Coveralls bot.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing Using Rspec ===&lt;br /&gt;
# We plan to test the response report page (/review_mapping/response_report?id={:assignmentID}) to make sure the new field (feedback, file and chart) exists.&lt;br /&gt;
# We will add a Rspec test in each controller which tests our new methods, such as have_file_added and have_link_added.&lt;br /&gt;
&lt;br /&gt;
=== Coverage ===&lt;br /&gt;
The coverage of Coveralls bot will be filled after our finish all our work.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
# Log in as an instructor &lt;br /&gt;
# Click Manage and choose Assignments &lt;br /&gt;
# Choose review report and click view&lt;br /&gt;
# See whether new fields are shown.&lt;br /&gt;
&lt;br /&gt;
== ''' Team Information ''' ==&lt;br /&gt;
Mentor: Mohit Jain&lt;br /&gt;
&lt;br /&gt;
* Mentor: Mohit Jain ()&lt;br /&gt;
* Jing Cai ()&lt;br /&gt;
* Yongjian Zhu ()&lt;br /&gt;
* Weiran Fu ()&lt;br /&gt;
* Dongyuan Wang () &lt;br /&gt;
&lt;br /&gt;
===Related Links===&lt;br /&gt;
#[https://github.com/aranne/expertiza  Forked GitHub Repository]&lt;/div&gt;</summary>
		<author><name>Jcai3</name></author>
	</entry>
</feed>