<?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=Mbgaffor</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=Mbgaffor"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Mbgaffor"/>
	<updated>2026-08-15T22:33:59Z</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_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137349</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137349"/>
		<updated>2020-11-17T21:24:50Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Previous Implementation Bug Fixes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
''Issue 1:'' When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 2:'' For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 3:'' In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 4:'' For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 5:'' For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 6:'' Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file renders the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
* app/views/reports/_team_score_score_awarded.html.erb (issue 4)&lt;br /&gt;
** This file will be created to assist with the rendering within _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
Additional files changed from bugs we discovered: &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*app/model/assignment.rb - Fixed the varying_rubrics_by_round? method &lt;br /&gt;
*spec/model/assignment_spec.rb - Added Rspec tests for varying_rubrics_by_round? method&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. We also fixed the bugs by adjusting a method inside assignment.rb, and so we added automated tests to cover this method. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is an overview of jQuery TableSorter which we used to preform the column header sorting on each of our three reports: &amp;lt;br/&amp;gt;&lt;br /&gt;
==='''jQuery tablesorter 2.0'''===&lt;br /&gt;
&lt;br /&gt;
* Multi-column sorting&lt;br /&gt;
* Multi-tbody sorting&lt;br /&gt;
* Parsers for sorting text, URIs, integers, currency, floats, IP addresses, dates (ISO, long and short formats), time. Add your own easily&lt;br /&gt;
* Support secondary &amp;quot;hidden&amp;quot; sorting (e.g., maintain alphabetical sort when sorting on other criteria)&lt;br /&gt;
* Extensibility via widget system&lt;br /&gt;
* Cross-browser: IE 6.0+, FF 2+, Safari 2.0+, Opera 9.0+&lt;br /&gt;
* Small code size&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
To learn more about the use of tablesorter jQuery to sort the author feedback, review, and teemate review reports, see the [https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc#Solution, E2018 Design Doc] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
* The sorting was implemented using tablesorter jQuery. An example of the script that was used for this can be found below:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
    $(function () {&lt;br /&gt;
        /*Function for sorting the table */&lt;br /&gt;
        $(&amp;quot;#myTable&amp;quot;).tablesorter({&lt;br /&gt;
            sortList: [[0, 0]], //sort First Column by default when page loads&lt;br /&gt;
            widgets: ['zebra'], // Make sure to update the css when column is sorted&lt;br /&gt;
            headers: {&lt;br /&gt;
                4: {&lt;br /&gt;
                    sorter: 'customParser' //custom Parser to parse Metrics data for the custom parser&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    });&lt;br /&gt;
    $.tablesorter.addParser({&lt;br /&gt;
        id: &amp;quot;customParser&amp;quot;,                                       //customParser for sorting by volume&lt;br /&gt;
        is: function (stringValue) {&lt;br /&gt;
            return false;&lt;br /&gt;
        },&lt;br /&gt;
        format: function (stringValue) {&lt;br /&gt;
            var stringNumericPart = stringValue.split(&amp;quot; &amp;quot;);         //split the data by spaces&lt;br /&gt;
            var numericValue = parseInt(stringNumericPart[2], 10);   //extract the numeric data&lt;br /&gt;
            return numericValue;&lt;br /&gt;
        },&lt;br /&gt;
        type: 'numeric'&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
* An example of the change can be seen below: &lt;br /&gt;
&lt;br /&gt;
Current Implementation: &lt;br /&gt;
&lt;br /&gt;
[[File:feedback_report_header.png|1080px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify Add Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
[[File:AssignHeader.png | 360px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
*There was a problem where assignments that had two different rubrics across rounds appeared with some graphical bugs.&lt;br /&gt;
*Changes were made in model/assignment.rb and view/_feedback_report.html.erb&lt;br /&gt;
*Originally, view caused crash due to undefined &amp;quot;+&amp;quot; with nil object, so the to_i method was called to prevent this.&lt;br /&gt;
*A graphical error happened causing poor layouts to appear, which was fixed by altering some model logic (&amp;lt;= to &amp;lt;)&lt;br /&gt;
Previous:&lt;br /&gt;
&lt;br /&gt;
[[File:To i previous.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:-=bug.png|720px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:Fixed view.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Fixedmodel.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Fixed author feedback.png|720px]]&lt;br /&gt;
&lt;br /&gt;
3. Formatting issue in review report:&lt;br /&gt;
*The review report table was previously created with a different style and format than the other tables; however, it seems that this problem only occurred when opening within a Chrome browser. &lt;br /&gt;
*We edited _review_report.html.erb to ensure the review report table matched the formatting of the other tables.&lt;br /&gt;
&lt;br /&gt;
Previous Layout: &lt;br /&gt;
&lt;br /&gt;
[[File:review_report_format_prev.png|720px]]&lt;br /&gt;
&lt;br /&gt;
Current Layout: &lt;br /&gt;
&lt;br /&gt;
[[File:review_report_format.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
* /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* For each of the listed files there were many one or two letter words that did not properly explain the variable's use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
Original Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|480px|]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Fixed implementation1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
==== Google Chrome Error ====&lt;br /&gt;
The bug couldn't be replicated on Windows 10. The prior group failed to find this bug as well, so we assumed that it has been patched in the past. It was likely poorly documented, but we recommend closing that issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_report_format_prev.png&amp;diff=137348</id>
		<title>File:Review report format prev.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_report_format_prev.png&amp;diff=137348"/>
		<updated>2020-11-17T21:24:01Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137347</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137347"/>
		<updated>2020-11-17T21:22:57Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Previous Implementation Bug Fixes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
''Issue 1:'' When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 2:'' For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 3:'' In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 4:'' For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 5:'' For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 6:'' Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file renders the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
* app/views/reports/_team_score_score_awarded.html.erb (issue 4)&lt;br /&gt;
** This file will be created to assist with the rendering within _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
Additional files changed from bugs we discovered: &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*app/model/assignment.rb - Fixed the varying_rubrics_by_round? method &lt;br /&gt;
*spec/model/assignment_spec.rb - Added Rspec tests for varying_rubrics_by_round? method&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. We also fixed the bugs by adjusting a method inside assignment.rb, and so we added automated tests to cover this method. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is an overview of jQuery TableSorter which we used to preform the column header sorting on each of our three reports: &amp;lt;br/&amp;gt;&lt;br /&gt;
==='''jQuery tablesorter 2.0'''===&lt;br /&gt;
&lt;br /&gt;
* Multi-column sorting&lt;br /&gt;
* Multi-tbody sorting&lt;br /&gt;
* Parsers for sorting text, URIs, integers, currency, floats, IP addresses, dates (ISO, long and short formats), time. Add your own easily&lt;br /&gt;
* Support secondary &amp;quot;hidden&amp;quot; sorting (e.g., maintain alphabetical sort when sorting on other criteria)&lt;br /&gt;
* Extensibility via widget system&lt;br /&gt;
* Cross-browser: IE 6.0+, FF 2+, Safari 2.0+, Opera 9.0+&lt;br /&gt;
* Small code size&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
To learn more about the use of tablesorter jQuery to sort the author feedback, review, and teemate review reports, see the [https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc#Solution, E2018 Design Doc] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
* The sorting was implemented using tablesorter jQuery. An example of the script that was used for this can be found below:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
    $(function () {&lt;br /&gt;
        /*Function for sorting the table */&lt;br /&gt;
        $(&amp;quot;#myTable&amp;quot;).tablesorter({&lt;br /&gt;
            sortList: [[0, 0]], //sort First Column by default when page loads&lt;br /&gt;
            widgets: ['zebra'], // Make sure to update the css when column is sorted&lt;br /&gt;
            headers: {&lt;br /&gt;
                4: {&lt;br /&gt;
                    sorter: 'customParser' //custom Parser to parse Metrics data for the custom parser&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    });&lt;br /&gt;
    $.tablesorter.addParser({&lt;br /&gt;
        id: &amp;quot;customParser&amp;quot;,                                       //customParser for sorting by volume&lt;br /&gt;
        is: function (stringValue) {&lt;br /&gt;
            return false;&lt;br /&gt;
        },&lt;br /&gt;
        format: function (stringValue) {&lt;br /&gt;
            var stringNumericPart = stringValue.split(&amp;quot; &amp;quot;);         //split the data by spaces&lt;br /&gt;
            var numericValue = parseInt(stringNumericPart[2], 10);   //extract the numeric data&lt;br /&gt;
            return numericValue;&lt;br /&gt;
        },&lt;br /&gt;
        type: 'numeric'&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
* An example of the change can be seen below: &lt;br /&gt;
&lt;br /&gt;
Current Implementation: &lt;br /&gt;
&lt;br /&gt;
[[File:feedback_report_header.png|1080px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify Add Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
[[File:AssignHeader.png | 360px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
*There was a problem where assignments that had two different rubrics across rounds appeared with some graphical bugs.&lt;br /&gt;
*Changes were made in model/assignment.rb and view/_feedback_report.html.erb&lt;br /&gt;
*Originally, view caused crash due to undefined &amp;quot;+&amp;quot; with nil object, so the to_i method was called to prevent this.&lt;br /&gt;
*A graphical error happened causing poor layouts to appear, which was fixed by altering some model logic (&amp;lt;= to &amp;lt;)&lt;br /&gt;
Previous:&lt;br /&gt;
&lt;br /&gt;
[[File:To i previous.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:-=bug.png|720px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:Fixed view.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Fixedmodel.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Fixed author feedback.png|720px]]&lt;br /&gt;
&lt;br /&gt;
3. Formatting issue in review report:&lt;br /&gt;
*The review report table was previously created with a different style and format than the other tables; however, it seems that this problem only occurred when opening within a Chrome browser. &lt;br /&gt;
*We edited _review_report.html.erb to ensure the review report table matched the formatting of the other tables.&lt;br /&gt;
&lt;br /&gt;
Previous Layout: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Current Layout: &lt;br /&gt;
&lt;br /&gt;
[[File:review_report_format.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
* /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* For each of the listed files there were many one or two letter words that did not properly explain the variable's use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
Original Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|480px|]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Fixed implementation1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
==== Google Chrome Error ====&lt;br /&gt;
The bug couldn't be replicated on Windows 10. The prior group failed to find this bug as well, so we assumed that it has been patched in the past. It was likely poorly documented, but we recommend closing that issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137346</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137346"/>
		<updated>2020-11-17T21:19:46Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Previous Implementation Bug Fixes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
''Issue 1:'' When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 2:'' For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 3:'' In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 4:'' For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 5:'' For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 6:'' Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file renders the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
* app/views/reports/_team_score_score_awarded.html.erb (issue 4)&lt;br /&gt;
** This file will be created to assist with the rendering within _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
Additional files changed from bugs we discovered: &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*app/model/assignment.rb - Fixed the varying_rubrics_by_round? method &lt;br /&gt;
*spec/model/assignment_spec.rb - Added Rspec tests for varying_rubrics_by_round? method&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. We also fixed the bugs by adjusting a method inside assignment.rb, and so we added automated tests to cover this method. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is an overview of jQuery TableSorter which we used to preform the column header sorting on each of our three reports: &amp;lt;br/&amp;gt;&lt;br /&gt;
==='''jQuery tablesorter 2.0'''===&lt;br /&gt;
&lt;br /&gt;
* Multi-column sorting&lt;br /&gt;
* Multi-tbody sorting&lt;br /&gt;
* Parsers for sorting text, URIs, integers, currency, floats, IP addresses, dates (ISO, long and short formats), time. Add your own easily&lt;br /&gt;
* Support secondary &amp;quot;hidden&amp;quot; sorting (e.g., maintain alphabetical sort when sorting on other criteria)&lt;br /&gt;
* Extensibility via widget system&lt;br /&gt;
* Cross-browser: IE 6.0+, FF 2+, Safari 2.0+, Opera 9.0+&lt;br /&gt;
* Small code size&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
To learn more about the use of tablesorter jQuery to sort the author feedback, review, and teemate review reports, see the [https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc#Solution, E2018 Design Doc] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
* The sorting was implemented using tablesorter jQuery. An example of the script that was used for this can be found below:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
    $(function () {&lt;br /&gt;
        /*Function for sorting the table */&lt;br /&gt;
        $(&amp;quot;#myTable&amp;quot;).tablesorter({&lt;br /&gt;
            sortList: [[0, 0]], //sort First Column by default when page loads&lt;br /&gt;
            widgets: ['zebra'], // Make sure to update the css when column is sorted&lt;br /&gt;
            headers: {&lt;br /&gt;
                4: {&lt;br /&gt;
                    sorter: 'customParser' //custom Parser to parse Metrics data for the custom parser&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    });&lt;br /&gt;
    $.tablesorter.addParser({&lt;br /&gt;
        id: &amp;quot;customParser&amp;quot;,                                       //customParser for sorting by volume&lt;br /&gt;
        is: function (stringValue) {&lt;br /&gt;
            return false;&lt;br /&gt;
        },&lt;br /&gt;
        format: function (stringValue) {&lt;br /&gt;
            var stringNumericPart = stringValue.split(&amp;quot; &amp;quot;);         //split the data by spaces&lt;br /&gt;
            var numericValue = parseInt(stringNumericPart[2], 10);   //extract the numeric data&lt;br /&gt;
            return numericValue;&lt;br /&gt;
        },&lt;br /&gt;
        type: 'numeric'&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
* An example of the change can be seen below: &lt;br /&gt;
&lt;br /&gt;
Current Implementation: &lt;br /&gt;
&lt;br /&gt;
[[File:feedback_report_header.png|1080px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify Add Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
[[File:AssignHeader.png | 360px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
*There was a problem where assignments that had two different rubrics across rounds appeared with some graphical bugs.&lt;br /&gt;
*Changes were made in model/assignment.rb and view/_feedback_report.html.erb&lt;br /&gt;
*Originally, view caused crash due to undefined &amp;quot;+&amp;quot; with nil object, so the to_i method was called to prevent this.&lt;br /&gt;
*A graphical error happened causing poor layouts to appear, which was fixed by altering some model logic (&amp;lt;= to &amp;lt;)&lt;br /&gt;
Previous:&lt;br /&gt;
&lt;br /&gt;
[[File:To i previous.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:-=bug.png|720px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:Fixed view.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Fixedmodel.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Fixed author feedback.png|720px]]&lt;br /&gt;
&lt;br /&gt;
3. Formatting issue in review report:&lt;br /&gt;
*The review report table was previously created with a different style and format than the other tables.&lt;br /&gt;
*We edited _review_report.html.erb to ensure the review report table matched the formatting of the other tables.&lt;br /&gt;
&lt;br /&gt;
Previous Layout: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Current Layout: &lt;br /&gt;
&lt;br /&gt;
[[File:review_report_format.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
* /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* For each of the listed files there were many one or two letter words that did not properly explain the variable's use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
Original Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|480px|]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Fixed implementation1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
==== Google Chrome Error ====&lt;br /&gt;
The bug couldn't be replicated on Windows 10. The prior group failed to find this bug as well, so we assumed that it has been patched in the past. It was likely poorly documented, but we recommend closing that issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_report_format.png&amp;diff=137344</id>
		<title>File:Review report format.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_report_format.png&amp;diff=137344"/>
		<updated>2020-11-17T21:18:23Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137341</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137341"/>
		<updated>2020-11-17T21:02:40Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Refactoring and Redocumentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
''Issue 1:'' When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 2:'' For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 3:'' In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 4:'' For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 5:'' For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
''Issue 6:'' Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file renders the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
* app/views/reports/_team_score_score_awarded.html.erb (issue 4)&lt;br /&gt;
** This file will be created to assist with the rendering within _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
Additional files changed from bugs we discovered: &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*app/model/assignment.rb - Fixed the varying_rubrics_by_round? method &lt;br /&gt;
*spec/model/assignment_spec.rb - Added Rspec tests for varying_rubrics_by_round? method&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. We also fixed the bugs by adjusting a method inside assignment.rb, and so we added automated tests to cover this method. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is an overview of jQuery TableSorter which we used to preform the column header sorting on each of our three reports: &amp;lt;br/&amp;gt;&lt;br /&gt;
==='''jQuery tablesorter 2.0'''===&lt;br /&gt;
&lt;br /&gt;
* Multi-column sorting&lt;br /&gt;
* Multi-tbody sorting&lt;br /&gt;
* Parsers for sorting text, URIs, integers, currency, floats, IP addresses, dates (ISO, long and short formats), time. Add your own easily&lt;br /&gt;
* Support secondary &amp;quot;hidden&amp;quot; sorting (e.g., maintain alphabetical sort when sorting on other criteria)&lt;br /&gt;
* Extensibility via widget system&lt;br /&gt;
* Cross-browser: IE 6.0+, FF 2+, Safari 2.0+, Opera 9.0+&lt;br /&gt;
* Small code size&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
To learn more about the use of tablesorter jQuery to sort the author feedback, review, and teemate review reports, see the [https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc#Solution, E2018 Design Doc] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
* The sorting was implemented using tablesorter jQuery. An example of the script that was used for this can be found below:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
    $(function () {&lt;br /&gt;
        /*Function for sorting the table */&lt;br /&gt;
        $(&amp;quot;#myTable&amp;quot;).tablesorter({&lt;br /&gt;
            sortList: [[0, 0]], //sort First Column by default when page loads&lt;br /&gt;
            widgets: ['zebra'], // Make sure to update the css when column is sorted&lt;br /&gt;
            headers: {&lt;br /&gt;
                4: {&lt;br /&gt;
                    sorter: 'customParser' //custom Parser to parse Metrics data for the custom parser&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    });&lt;br /&gt;
    $.tablesorter.addParser({&lt;br /&gt;
        id: &amp;quot;customParser&amp;quot;,                                       //customParser for sorting by volume&lt;br /&gt;
        is: function (stringValue) {&lt;br /&gt;
            return false;&lt;br /&gt;
        },&lt;br /&gt;
        format: function (stringValue) {&lt;br /&gt;
            var stringNumericPart = stringValue.split(&amp;quot; &amp;quot;);         //split the data by spaces&lt;br /&gt;
            var numericValue = parseInt(stringNumericPart[2], 10);   //extract the numeric data&lt;br /&gt;
            return numericValue;&lt;br /&gt;
        },&lt;br /&gt;
        type: 'numeric'&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
* An example of the change can be seen below: &lt;br /&gt;
&lt;br /&gt;
Current Implementation: &lt;br /&gt;
&lt;br /&gt;
[[File:feedback_report_header.png|1080px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify Add Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
[[File:AssignHeader.png | 360px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
*There was a problem where assignments that had two different rubrics across rounds appeared with some graphical bugs.&lt;br /&gt;
*Changes were made in model/assignment.rb and view/_feedback_report.html.erb&lt;br /&gt;
*Originally, view caused crash due to undefined &amp;quot;+&amp;quot; with nil object, so the to_i method was called to prevent this.&lt;br /&gt;
*A graphical error happened causing poor layouts to appear, which was fixed by altering some model logic (&amp;lt;= to &amp;lt;)&lt;br /&gt;
Previous:&lt;br /&gt;
&lt;br /&gt;
[[File:To i previous.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:-=bug.png|720px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:Fixed view.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Fixedmodel.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Fixed author feedback.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
* /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* For each of the listed files there were many one or two letter words that did not properly explain the variable's use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
Original Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|480px|]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Fixed implementation1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
==== Google Chrome Error ====&lt;br /&gt;
The bug couldn't be replicated on Windows 10. The prior group failed to find this bug as well, so we assumed that it has been patched in the past. It was likely poorly documented, but we recommend closing that issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137302</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137302"/>
		<updated>2020-11-17T20:17:05Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Files Requiring Modification */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file renders the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
* app/views/reports/_team_score_score_awarded.html.erb (issue 4)&lt;br /&gt;
** This file will be created to assist with the rendering within _review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
Additional files changed from bugs we discovered: &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*app/model/assignment.rb - Fixed the varying_rubrics_by_round? method &lt;br /&gt;
*spec/model/assignment_spec.rb - Added Rspec tests for varying_rubrics_by_round? method&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
* The sorting was implemented using tablesorter jQuery. An example of the script that was used for this can be found below:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
    $(function () {&lt;br /&gt;
        /*Function for sorting the table */&lt;br /&gt;
        $(&amp;quot;#myTable&amp;quot;).tablesorter({&lt;br /&gt;
            sortList: [[0, 0]], //sort First Column by default when page loads&lt;br /&gt;
            widgets: ['zebra'], // Make sure to update the css when column is sorted&lt;br /&gt;
            headers: {&lt;br /&gt;
                4: {&lt;br /&gt;
                    sorter: 'customParser' //custom Parser to parse Metrics data for the custom parser&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    });&lt;br /&gt;
    $.tablesorter.addParser({&lt;br /&gt;
        id: &amp;quot;customParser&amp;quot;,                                       //customParser for sorting by volume&lt;br /&gt;
        is: function (stringValue) {&lt;br /&gt;
            return false;&lt;br /&gt;
        },&lt;br /&gt;
        format: function (stringValue) {&lt;br /&gt;
            var stringNumericPart = stringValue.split(&amp;quot; &amp;quot;);         //split the data by spaces&lt;br /&gt;
            var numericValue = parseInt(stringNumericPart[2], 10);   //extract the numeric data&lt;br /&gt;
            return numericValue;&lt;br /&gt;
        },&lt;br /&gt;
        type: 'numeric'&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
* An example of the change can be seen below: &lt;br /&gt;
&lt;br /&gt;
Current Implementation: &lt;br /&gt;
&lt;br /&gt;
[[File:feedback_report_header.png|1080px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify Add Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
[[File:AssignHeader.png | 360px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
*There was a problem where assignments that had two different rubrics across rounds appeared with some graphical bugs.&lt;br /&gt;
*Changes were made in model/assignment.rb and view/_feedback_report.html.erb&lt;br /&gt;
*Originally, view caused crash due to undefined &amp;quot;+&amp;quot; with nil object, so the to_i method was called to prevent this.&lt;br /&gt;
*A graphical error happened causing poor layouts to appear, which was fixed by altering some model logic (&amp;lt;= to &amp;lt;)&lt;br /&gt;
Previous:&lt;br /&gt;
&lt;br /&gt;
[[File:To i previous.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:-=bug.png|720px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:Fixed view.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Fixedmodel.png|720px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Fixed author feedback.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|480px|]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Fixed implementation1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
==== Google Chrome Error ====&lt;br /&gt;
The bug couldn't be replicated on Windows 10. The prior group failed to find this bug as well, so we assumed that it has been patched in the past. It was likely poorly documented, but we recommend closing that issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137143</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137143"/>
		<updated>2020-11-17T01:44:58Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Sort Headers in View Review Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
* The sorting was implemented using tablesorter jQuery. An example of the script that was used for this can be found below:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;script&amp;gt;&lt;br /&gt;
    $(function () {&lt;br /&gt;
        /*Function for sorting the table */&lt;br /&gt;
        $(&amp;quot;#myTable&amp;quot;).tablesorter({&lt;br /&gt;
            sortList: [[0, 0]], //sort First Column by default when page loads&lt;br /&gt;
            widgets: ['zebra'], // Make sure to update the css when column is sorted&lt;br /&gt;
            headers: {&lt;br /&gt;
                4: {&lt;br /&gt;
                    sorter: 'customParser' //custom Parser to parse Metrics data for the custom parser&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    });&lt;br /&gt;
    $.tablesorter.addParser({&lt;br /&gt;
        id: &amp;quot;customParser&amp;quot;,                                       //customParser for sorting by volume&lt;br /&gt;
        is: function (stringValue) {&lt;br /&gt;
            return false;&lt;br /&gt;
        },&lt;br /&gt;
        format: function (stringValue) {&lt;br /&gt;
            var stringNumericPart = stringValue.split(&amp;quot; &amp;quot;);         //split the data by spaces&lt;br /&gt;
            var numericValue = parseInt(stringNumericPart[2], 10);   //extract the numeric data&lt;br /&gt;
            return numericValue;&lt;br /&gt;
        },&lt;br /&gt;
        type: 'numeric'&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
* An example of the change can be seen below: &lt;br /&gt;
&lt;br /&gt;
Current Implementation: &lt;br /&gt;
&lt;br /&gt;
[[File:feedback_report_header.png|1080px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify Add Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
[[File:AssignHeader.png | 360px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
*There was a problem where assignments that had two different rubrics across rounds appeared with some graphical bugs.&lt;br /&gt;
*Changes were made in model/assignment.rb and view/_feedback_report.html.erb&lt;br /&gt;
*Originally, view caused crash due to undefined &amp;quot;+&amp;quot; with nil object, so the to_i method was called to prevent this.&lt;br /&gt;
*A graphical error happened causing poor layouts to appear, which was fixed by altering some model logic (&amp;lt;= to &amp;lt;)&lt;br /&gt;
[[File:Fixed author feedback.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Fixed implementation1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
==== Google Chrome Error ====&lt;br /&gt;
The bug couldn't be replicated on Windows 10. The prior group failed to find this bug as well, so we assumed that it has been patched in the past. It was likely poorly documented, but we recommend closing that issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137140</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137140"/>
		<updated>2020-11-17T01:44:43Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Sort Headers in View Review Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
* The sorting was implemented using tablesorter jQuery. An example of the script that was used for this can be found below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    $(function () {&lt;br /&gt;
        /*Function for sorting the table */&lt;br /&gt;
        $(&amp;quot;#myTable&amp;quot;).tablesorter({&lt;br /&gt;
            sortList: [[0, 0]], //sort First Column by default when page loads&lt;br /&gt;
            widgets: ['zebra'], // Make sure to update the css when column is sorted&lt;br /&gt;
            headers: {&lt;br /&gt;
                4: {&lt;br /&gt;
                    sorter: 'customParser' //custom Parser to parse Metrics data for the custom parser&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    });&lt;br /&gt;
    $.tablesorter.addParser({&lt;br /&gt;
        id: &amp;quot;customParser&amp;quot;,                                       //customParser for sorting by volume&lt;br /&gt;
        is: function (stringValue) {&lt;br /&gt;
            return false;&lt;br /&gt;
        },&lt;br /&gt;
        format: function (stringValue) {&lt;br /&gt;
            var stringNumericPart = stringValue.split(&amp;quot; &amp;quot;);         //split the data by spaces&lt;br /&gt;
            var numericValue = parseInt(stringNumericPart[2], 10);   //extract the numeric data&lt;br /&gt;
            return numericValue;&lt;br /&gt;
        },&lt;br /&gt;
        type: 'numeric'&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
* An example of the change can be seen below: &lt;br /&gt;
&lt;br /&gt;
Current Implementation: &lt;br /&gt;
&lt;br /&gt;
[[File:feedback_report_header.png|1080px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify Add Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
[[File:AssignHeader.png | 360px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
*There was a problem where assignments that had two different rubrics across rounds appeared with some graphical bugs.&lt;br /&gt;
*Changes were made in model/assignment.rb and view/_feedback_report.html.erb&lt;br /&gt;
*Originally, view caused crash due to undefined &amp;quot;+&amp;quot; with nil object, so the to_i method was called to prevent this.&lt;br /&gt;
*A graphical error happened causing poor layouts to appear, which was fixed by altering some model logic (&amp;lt;= to &amp;lt;)&lt;br /&gt;
[[File:Fixed author feedback.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Fixed implementation1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
==== Google Chrome Error ====&lt;br /&gt;
The bug couldn't be replicated on Windows 10. The prior group failed to find this bug as well, so we assumed that it has been patched in the past. It was likely poorly documented, but we recommend closing that issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137138</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137138"/>
		<updated>2020-11-17T01:43:42Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Sort Headers in View Review Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
* The sorting was implemented using tablesorter jQuery. An example of the script that was used for this can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:Sort_code3.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
* An example of the change can be seen below: &lt;br /&gt;
&lt;br /&gt;
Current Implementation: &lt;br /&gt;
&lt;br /&gt;
[[File:feedback_report_header.png|1080px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify Add Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
[[File:AssignHeader.png | 360px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
*There was a problem where assignments that had two different rubrics across rounds appeared with some graphical bugs.&lt;br /&gt;
*Changes were made in model/assignment.rb and view/_feedback_report.html.erb&lt;br /&gt;
*Originally, view caused crash due to undefined &amp;quot;+&amp;quot; with nil object, so the to_i method was called to prevent this.&lt;br /&gt;
*A graphical error happened causing poor layouts to appear, which was fixed by altering some model logic (&amp;lt;= to &amp;lt;)&lt;br /&gt;
[[File:Fixed author feedback.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Fixed implementation1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
==== Google Chrome Error ====&lt;br /&gt;
The bug couldn't be replicated on Windows 10. The prior group failed to find this bug as well, so we assumed that it has been patched in the past. It was likely poorly documented, but we recommend closing that issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Sort_code3.png&amp;diff=137137</id>
		<title>File:Sort code3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Sort_code3.png&amp;diff=137137"/>
		<updated>2020-11-17T01:42:52Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137135</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137135"/>
		<updated>2020-11-17T01:40:56Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Sort Headers in View Review Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
* The sorting was implemented using tablesorter jQuery. An example of the script that was used for this can be found below:&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
* An example of the change can be seen below: &lt;br /&gt;
&lt;br /&gt;
Current Implementation: &lt;br /&gt;
&lt;br /&gt;
[[File:feedback_report_header.png|1080px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify Add Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
[[File:AssignHeader.png | 360px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
*There was a problem where assignments that had two different rubrics across rounds appeared with some graphical bugs.&lt;br /&gt;
*Changes were made in model/assignment.rb and view/_feedback_report.html.erb&lt;br /&gt;
*Originally, view caused crash due to undefined &amp;quot;+&amp;quot; with nil object, so the to_i method was called to prevent this.&lt;br /&gt;
*A graphical error happened causing poor layouts to appear, which was fixed by altering some model logic (&amp;lt;= to &amp;lt;)&lt;br /&gt;
[[File:Fixed author feedback.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Fixed implementation1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
==== Google Chrome Error ====&lt;br /&gt;
The bug couldn't be replicated on Windows 10. The prior group failed to find this bug as well, so we assumed that it has been patched in the past. It was likely poorly documented, but we recommend closing that issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137131</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137131"/>
		<updated>2020-11-17T01:39:27Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Sort/Modify Headers in Author Feedback report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
* The sorting was implemented using tablesorter jQuery. An example of the script that was used for this can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:Sort_code1.png|520px]] [[File:Sort_code2.png|460px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
* An example of the change can be seen below: &lt;br /&gt;
&lt;br /&gt;
Current Implementation: &lt;br /&gt;
&lt;br /&gt;
[[File:feedback_report_header.png|1080px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
*There was a problem where assignments that had two different rubrics across rounds appeared with some graphical bugs.&lt;br /&gt;
*Changes were made in model/assignment.rb and view/_feedback_report.html.erb&lt;br /&gt;
*Originally, view caused crash due to undefined &amp;quot;+&amp;quot; with nil object, so the to_i method was called to prevent this.&lt;br /&gt;
*A graphical error happened causing poor layouts to appear, which was fixed by altering some model logic (&amp;lt;= to &amp;lt;)&lt;br /&gt;
[[File:Fixed author feedback.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Fixed implementation1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
==== Google Chrome Error ====&lt;br /&gt;
The bug couldn't be replicated on Windows 10. The prior group failed to find this bug as well, so we assumed that it has been patched in the past. It was likely poorly documented, but we recommend closing that issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137129</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137129"/>
		<updated>2020-11-17T01:37:34Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Sort/Modify Headers in Author Feedback report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
* The sorting was implemented using tablesorter jQuery. An example of the script that was used for this can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:Sort_code1.png|520px]] [[File:Sort_code2.png|460px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
* An example of the change can be seen below: &lt;br /&gt;
&lt;br /&gt;
[[File:feedback_report_header.png|1080px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
*There was a problem where assignments that had two different rubrics across rounds appeared with some graphical bugs.&lt;br /&gt;
*Changes were made in model/assignment.rb and view/_feedback_report.html.erb&lt;br /&gt;
*Originally, view caused crash due to undefined &amp;quot;+&amp;quot; with nil object, so the to_i method was called to prevent this.&lt;br /&gt;
*A graphical error happened causing poor layouts to appear, which was fixed by altering some model logic (&amp;lt;= to &amp;lt;)&lt;br /&gt;
[[File:Fixed author feedback.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Fixed implementation1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
==== Google Chrome Error ====&lt;br /&gt;
The bug couldn't be replicated on Windows 10. The prior group failed to find this bug as well, so we assumed that it has been patched in the past. It was likely poorly documented, but we recommend closing that issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Feedback_report_header.png&amp;diff=137127</id>
		<title>File:Feedback report header.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Feedback_report_header.png&amp;diff=137127"/>
		<updated>2020-11-17T01:36:23Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137123</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137123"/>
		<updated>2020-11-17T01:29:33Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Sort Headers in View Review Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
* The sorting was implemented using tablesorter jQuery. An example of the script that was used for this can be found below:&lt;br /&gt;
&lt;br /&gt;
[[File:Sort_code1.png|520px]] [[File:Sort_code2.png|460px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
*There was a problem where assignments that had two different rubrics across rounds appeared with some graphical bugs.&lt;br /&gt;
*Changes were made in model/assignment.rb and view/_feedback_report.html.erb&lt;br /&gt;
*Originally, view caused crash due to undefined &amp;quot;+&amp;quot; with nil object, so the to_i method was called to prevent this.&lt;br /&gt;
*A graphical error happened causing poor layouts to appear, which was fixed by altering some model logic (&amp;lt;= to &amp;lt;)&lt;br /&gt;
[[File:Fixed author feedback.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Fixed implementation1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
==== Google Chrome Error ====&lt;br /&gt;
The bug couldn't be replicated on Windows 10. The prior group failed to find this bug as well, so we assumed that it has been patched in the past. It was likely poorly documented, but we recommend closing that issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Sort_code2.png&amp;diff=137121</id>
		<title>File:Sort code2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Sort_code2.png&amp;diff=137121"/>
		<updated>2020-11-17T01:26:34Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Sort_code1.png&amp;diff=137120</id>
		<title>File:Sort code1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Sort_code1.png&amp;diff=137120"/>
		<updated>2020-11-17T01:26:13Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137115</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137115"/>
		<updated>2020-11-17T01:22:14Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Sort Headers in View Review Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
* The sorting was implemented using tablesorter jQuery. An example of the script that was used for this can be found below.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
*There was a problem where assignments that had two different rubrics across rounds appeared with some graphical bugs.&lt;br /&gt;
*Changes were made in model/assignment.rb and view/_feedback_report.html.erb&lt;br /&gt;
*Originally, view caused crash due to undefined &amp;quot;+&amp;quot; with nil object, so the to_i method was called to prevent this.&lt;br /&gt;
*A graphical error happened causing poor layouts to appear, which was fixed by altering some model logic (&amp;lt;= to &amp;lt;)&lt;br /&gt;
[[File:Fixed author feedback.png|720px]]&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Fixed implementation1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
==== Google Chrome Error ====&lt;br /&gt;
The bug couldn't be replicated on Windows 10. The prior group failed to find this bug as well, so we assumed that it has been patched in the past. It was likely poorly documented, but we recommend closing that issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137078</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137078"/>
		<updated>2020-11-16T23:24:49Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Previous Implementation Bug Fixes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
Previous: &lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
Current:&lt;br /&gt;
&lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137075</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137075"/>
		<updated>2020-11-16T23:23:51Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Previous Implementation Bug Fixes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]] &lt;br /&gt;
[[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137074</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137074"/>
		<updated>2020-11-16T23:23:34Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Previous Implementation Bug Fixes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
&lt;br /&gt;
[[File:BeforeRefactor.png|360px]] [[File:AfterRefactor.png|360px]]&lt;br /&gt;
&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137070</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137070"/>
		<updated>2020-11-16T23:19:43Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Solution Implemented */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
All changes for this issue were made in the files: &lt;br /&gt;
&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made to fix the bugs that were found: &lt;br /&gt;
&lt;br /&gt;
1. Drag and Drop capability in the author feedback report table:&lt;br /&gt;
* The previous implementation had enable the sortable feature found in tablesorter jQuery tables. This feature allows the user to drag an entry within the table and move it to do manual sorting. This would cause the layout of the table to mess and so we removed the feature to prevent this.&lt;br /&gt;
2. Formatting issue in the author feedback report table:&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137066</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137066"/>
		<updated>2020-11-16T23:09:59Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Solution Implemented */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
==='''Previous Implementation Bug Fixes'''===&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137065</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137065"/>
		<updated>2020-11-16T23:09:18Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Refactoring and Redocumentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137059</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137059"/>
		<updated>2020-11-16T23:04:35Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Refactoring and Redocumentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Refactor and enhance documentation in Author Feedback Reports''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made: &lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to each file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137058</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137058"/>
		<updated>2020-11-16T23:04:11Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Solution Implemented */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Refactor and enhance documentation in Author Feedback Reports''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made: &lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Refactoring and Redocumentation''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/_review_report.html.erb&lt;br /&gt;
* /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to the file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137053</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137053"/>
		<updated>2020-11-16T23:00:57Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Refactor and Re-document Review Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Refactor and Re-document Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to the file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Refactored and enhanced documentation in Author Feedback Reports''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The issues presented were - &lt;br /&gt;
* For &amp;quot;Author feedback reports&amp;quot; table when no feedback has been submitted, the names of students appear in a strange horizontal format. This formatting should be fixed.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137052</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137052"/>
		<updated>2020-11-16T23:00:45Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Refactor and Re-document Review Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Refactor and Re-document Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to the file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Refactored and enhanced documentation in Author Feedback Reports''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The issues presented were - &lt;br /&gt;
* For &amp;quot;Author feedback reports&amp;quot; table when no feedback has been submitted, the names of students appear in a strange horizontal format. This formatting should be fixed.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137050</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137050"/>
		<updated>2020-11-16T22:59:48Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Refactor and Re-document Review Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Refactor and Re-document Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes made:&lt;br /&gt;
&lt;br /&gt;
* Throughout the .erb file responsible for rendering the review report page there were many one or two letter words that did not properly &lt;br /&gt;
explain the variables use. We changed these variable names to make them more readable.&lt;br /&gt;
* We added comments to the file to ensure that it is easily explained and readable for future developers&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Verify added Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Previous implementation added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Verified that prior implementation indeed was successful. Hence, no further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Fix formatting in Author Feedback Reports''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The issues presented were - &lt;br /&gt;
* For &amp;quot;Author feedback reports&amp;quot; table when no feedback has been submitted, the names of students appear in a strange horizontal format. This formatting should be fixed.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown menu performance''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10, same as prior implementation group. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137047</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137047"/>
		<updated>2020-11-16T22:55:38Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Sort Headers in View Review Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Refactor and Re-document Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Add Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Changes needed for this issue were:&lt;br /&gt;
* Add a header to the top of the &amp;quot;View Reports&amp;quot; page for each assignment&lt;br /&gt;
&lt;br /&gt;
This added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
No further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Fix formatting in Author Feedback Reports''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The issues presented were - &lt;br /&gt;
* For &amp;quot;Author feedback reports&amp;quot; table when no feedback has been submitted, the names of students appear in a strange horizontal format. This formatting should be fixed.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown performance in dropdown''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137046</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137046"/>
		<updated>2020-11-16T22:55:04Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Solution Implemented */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Add Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Changes needed for this issue were:&lt;br /&gt;
* Add a header to the top of the &amp;quot;View Reports&amp;quot; page for each assignment&lt;br /&gt;
&lt;br /&gt;
This added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
No further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Fix formatting in Author Feedback Reports''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The issues presented were - &lt;br /&gt;
* For &amp;quot;Author feedback reports&amp;quot; table when no feedback has been submitted, the names of students appear in a strange horizontal format. This formatting should be fixed.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown performance in dropdown''' ===&lt;br /&gt;
Issue wasn't replicable in Chrome on Windows 10. Hence, no changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137041</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137041"/>
		<updated>2020-11-16T22:48:47Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Solution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:''' &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
To address the sorting issues stated above the previous team utilized tablesorter jQuery. This implementation worked well to solve the sorting problems and so our group will reuse that strategy; however, by using that implementation we introduced a lot of bugs that were not previously fixed as well as code that needed to be refactored to ensure it followed proper Ruby guidelines. We were able to find the root of each bug we found using UI testing, and fixed each issue. Additionally, we added numerous comments to further explain both the new code introduced into the project by our group and the previous team, and the code that was already present within the project. While at the same time renaming variables and refactoring code within views that did not follow proper guidelines. &lt;br /&gt;
&lt;br /&gt;
*To learn more about the use of tablesorter jQuery to sort the tables view the following design document:&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Add Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Changes needed for this issue were:&lt;br /&gt;
* Add a header to the top of the &amp;quot;View Reports&amp;quot; page for each assignment&lt;br /&gt;
&lt;br /&gt;
This added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
No further additions were required for this issue.&lt;br /&gt;
&lt;br /&gt;
=== '''Fix formatting in Author Feedback Reports''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The issues presented were - &lt;br /&gt;
* For &amp;quot;Author feedback reports&amp;quot; table when no feedback has been submitted, the names of students appear in a strange horizontal format. This formatting should be fixed.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown performance in dropdown''' ===&lt;br /&gt;
No changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137008</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=137008"/>
		<updated>2020-11-16T21:51:45Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports that can be viewed for a specific assignment. Our issue revolves around formatting these report views correctly and in a way that displays all necessary information in an organized fashion, as well as implementing and improving upon the sorting functions for each report/table of information. We also refined the existing code by increasing the documentation, removing out-standing bugs, and writing additional rspec tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. This project was attempted previously and was partially merged. We will need to review their code and fix the bugs and refactor the code to ensure that the implementation will be able to merge.&lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Current Implentation:'''&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1845 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/lburgess07/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. We have reviewed the code and found bugs that are preventing the program from working correctly that need to be fixed. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date.&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Diagram''' == &lt;br /&gt;
&lt;br /&gt;
[[File:USE_CASE.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Solution''' ==&lt;br /&gt;
&lt;br /&gt;
We will be using tablesorter jQuery to sort the table. For table columns which have constraints on them for sorting, we will be creating custom scripts which tablesorter library supports to sort those columns. According to the problem type, we are supposed to perform three kinds of sorting. All these have one thing in common. Adding up the tablesorter script in the body before using them. After including the script, we are supposed to do some modifications in the table tag by including the class. Three types of scenario may arise:&lt;br /&gt;
&lt;br /&gt;
1) Sorting by columns alphabetically - To sort the columns alphabetically, the table-head attribute must include sorter-true class with it to enable the sorting alphabetically.&lt;br /&gt;
&lt;br /&gt;
2) Sorting by date - It includes adding of a date default format in the script to denote the sorter type that must be used to sort the column of the date.&lt;br /&gt;
&lt;br /&gt;
3) Sorting by the first number followed by the second number - It will require splitting up of the data into two parts separated by '/' and then sorting the first part, followed by the second part.&lt;br /&gt;
&lt;br /&gt;
==='''jQuery tablesorter 2.0'''===&lt;br /&gt;
&lt;br /&gt;
* Multi-column sorting&lt;br /&gt;
* Multi-tbody sorting&lt;br /&gt;
* Parsers for sorting text, URIs, integers, currency, floats, IP addresses, dates (ISO, long and short formats), time. Add your own easily&lt;br /&gt;
* Support secondary &amp;quot;hidden&amp;quot; sorting (e.g., maintain alphabetical sort when sorting on other criteria)&lt;br /&gt;
* Extensibility via widget system&lt;br /&gt;
* Cross-browser: IE 6.0+, FF 2+, Safari 2.0+, Opera 9.0+&lt;br /&gt;
* Small code size&lt;br /&gt;
&lt;br /&gt;
== '''Solution Implemented''' ==&lt;br /&gt;
=== '''Sort Headers in View Review Report''' ===&lt;br /&gt;
All changes for this issue were made in the files:&lt;br /&gt;
&lt;br /&gt;
* /views/reports/review_report.html.erb&lt;br /&gt;
* /views/reports/_team_score_score_awarded.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for the Review Report table were:&lt;br /&gt;
&lt;br /&gt;
* Make the &amp;quot;Reviews Done&amp;quot;, &amp;quot;Team Reviewed&amp;quot;, and &amp;quot;Score Awarded/Average Score&amp;quot; columns sortable.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort/Modify Headers in Author Feedback report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The changes required for Author Feedback table were - &lt;br /&gt;
&lt;br /&gt;
* Changing the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”.&lt;br /&gt;
&lt;br /&gt;
=== '''Sort Teammate Review report''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were made in the file /views/reports/_teammate_review_report.html.erb&lt;br /&gt;
&lt;br /&gt;
Changes needed for these issue were - &lt;br /&gt;
&lt;br /&gt;
* We have to sort the first 3 columns as a string and sort the last column as a date in the “Teammate Reviews” table&lt;br /&gt;
&lt;br /&gt;
=== '''Add Header to View Reports''' ===&lt;br /&gt;
All changes for this issue were made in the file /views/reports/response_report.html.haml&lt;br /&gt;
&lt;br /&gt;
Changes needed for this issue were:&lt;br /&gt;
* Add a header to the top of the &amp;quot;View Reports&amp;quot; page for each assignment&lt;br /&gt;
&lt;br /&gt;
This issue was trivial to resolve. It came down to adding the following three lines of haml to the top of the aforementioned file:&lt;br /&gt;
&lt;br /&gt;
  %h1&lt;br /&gt;
  Reports for&lt;br /&gt;
  = @assignment.name&lt;br /&gt;
&lt;br /&gt;
This added a header to the top of the &amp;quot;View Reports&amp;quot; page reading &amp;quot;Reports for &amp;lt;name of assignment&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== '''Fix formatting in Author Feedback Reports''' ===&lt;br /&gt;
&lt;br /&gt;
All changes for this issue were make in the file  /views/reports/_feedback_report.html.erb&lt;br /&gt;
&lt;br /&gt;
The issues presented were - &lt;br /&gt;
* For &amp;quot;Author feedback reports&amp;quot; table when no feedback has been submitted, the names of students appear in a strange horizontal format. This formatting should be fixed.&lt;br /&gt;
&lt;br /&gt;
=== '''Verify dropdown performance in dropdown''' ===&lt;br /&gt;
No changes were made for this issue.&lt;br /&gt;
&lt;br /&gt;
== '''Increased Code Documentation''' ==&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
For our project, which is mostly concerned with making changes to different views, we are planning to do the majority of testing through manual UI testing. &lt;br /&gt;
As of now, we don't anticipate having to make many/any changes to files that are not views. If any changes are made to controllers, models, etc to accomplish our tasks, we will adjust or add SPEC tests to make sure our code is covered. &lt;br /&gt;
=== '''UI Testing''' ===&lt;br /&gt;
==== Configuration ====&lt;br /&gt;
1. Log in as an instructor6 &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Click manage and then assignments. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose an assignment and click the button/icon for 'View Reports' &amp;lt;br/&amp;gt;&lt;br /&gt;
* A good assignment to use is the 'Final project (and design doc)' for testing purposes. &lt;br /&gt;
&lt;br /&gt;
==== Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Review report''' and click '''View'''&lt;br /&gt;
Test the following features for correctness:&lt;br /&gt;
* “Reviewer” and “Metric” are sortable&lt;br /&gt;
* “Review done” by the first number then the second number (e.g., 0/1, 0/2, 0/3, 1/1, 1/5, 2/2...)&lt;br /&gt;
* “Team reviewed” is sorted alphabetically&lt;br /&gt;
* “Score awarded / Avg. score” (the first percentage) is sorted in both ascending or descending order&lt;br /&gt;
&lt;br /&gt;
==== Author Feedback Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Author feedback''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Header name “Review response rejoined” -&amp;gt; “Review responded to” &lt;br /&gt;
* Change “Last rejoined at” to “Last responded at”. &lt;br /&gt;
* Verify sorting works as expected: &lt;br /&gt;
** Sort “Rejoinder” and “Review responded to” as string (alphabetically) &amp;lt;br/&amp;gt;&lt;br /&gt;
** Sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) &lt;br /&gt;
** Sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
Current Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Current_implementation_1.png|720px|]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Teammate Review Report Sorting ====&lt;br /&gt;
1. From the dropdown, select '''Teammate Review Report''' and click '''View'''&lt;br /&gt;
Verify the following changes:&lt;br /&gt;
* Able to sort the first 3 columns as string &lt;br /&gt;
* Able to sort the last column as date.&lt;br /&gt;
&lt;br /&gt;
==== Drag and Drop Bug ====&lt;br /&gt;
Upon implementation of previous groups' work, we found a drag and drop bug where items in report were draggable. We have fixed the bug, &amp;lt;br/&amp;gt; but testing can be performed by the following:&lt;br /&gt;
* Navigate to all three of the different reports outlined above&lt;br /&gt;
* Verify no items/cells are draggable &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Automated Testing''' ===&lt;br /&gt;
We made changed to the Assignmnet#vary_rubrics_by_round? method in order to fix a bug. The method did not have any RSPEC tests written. &amp;lt;br/&amp;gt;&lt;br /&gt;
We have written RSPEC tests to throughly test this method. The RSPEC tests are added in spec/models/assignment_spec.rb and are as follows:&lt;br /&gt;
&lt;br /&gt;
  describe '#vary_rubrics_by_round?' do&lt;br /&gt;
    context 'when rubrics varies over rounds' do&lt;br /&gt;
      it 'should return true' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 2&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1, assignment_questionnaire2])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when rubrics do not vary over rounds' do&lt;br /&gt;
      it 'should return false' do&lt;br /&gt;
        assignment_questionnaire1.used_in_round = 2&lt;br /&gt;
        assignment_questionnaire2.used_in_round = 1&lt;br /&gt;
        allow(AssignmentQuestionnaire).to receive(:where).and_return([assignment_questionnaire1])&lt;br /&gt;
        expect(assignment.varying_rubrics_by_round?).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
John Bumgardner&amp;lt;br/&amp;gt;&lt;br /&gt;
Luke Burgess&amp;lt;br/&amp;gt;&lt;br /&gt;
Robert Casano&amp;lt;br/&amp;gt;&lt;br /&gt;
Micah Gafford&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=135958</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=135958"/>
		<updated>2020-10-22T01:58:03Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Use Case Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU and supported by MIT and the National Science Foundation. &lt;br /&gt;
&lt;br /&gt;
It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. &lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. There is a heavy amount of code in views that can be moved into models to make the code more DRY and follow Ruby guidelines better &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''Use Case Diagram''' ==&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=135957</id>
		<title>CSC/ECE 517 Fall 2020 - E2084 sort instructor reports by name ID score etc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2084_sort_instructor_reports_by_name_ID_score_etc&amp;diff=135957"/>
		<updated>2020-10-22T01:56:40Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: Created page with &amp;quot;== '''Introduction''' ==  Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU and supported by MIT...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU and supported by MIT and the National Science Foundation. &lt;br /&gt;
&lt;br /&gt;
It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza allows instructors to view kinds of reports of assignments in their courses such as submissions, scores, and review reports. To improve the report views, some table columns such as team name, score, average should be made sortable by using the same existing sort library. &lt;br /&gt;
Note: This project has been attempted and partially merged.&lt;br /&gt;
&lt;br /&gt;
'''Previous Implementation:'''&lt;br /&gt;
There has been an attempt on this project this spring after the partial merge, and the following submission was made: &amp;lt;br/&amp;gt;&lt;br /&gt;
https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2020_-_E2018_sort_instructor_reports_by_name_ID_score_etc &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1723 &amp;lt;br/&amp;gt;&lt;br /&gt;
https://github.com/jandres61/expertiza/tree/beta &amp;lt;br/&amp;gt;&lt;br /&gt;
https://youtu.be/uZfo4MWsnrI &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''What needs to be done''' ===&lt;br /&gt;
&lt;br /&gt;
1. When the user clicks on the “View reports” icon, a page appears with a drop-down.  However, that page does not say what assignment’s reports are being viewed.  Add a header, “Reports for [name of assignment]” at the top. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. For Author feedback reports, when no feedback has been submitted by any student, the names of the participants appear in a strange horizontal format.  Fix this so that the formatting is correct, regardless of how many participants have done author feedback. &amp;lt;br/&amp;gt;&lt;br /&gt;
3. In Chrome on Windows 10, the dropdown has a tendency to freeze up, especially after one report has been viewed.  Please reproduce the problem, find a fix, and implement it. &amp;lt;br/&amp;gt;&lt;br /&gt;
4. For “Author feedback report” table, change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at”. Then, sort “Rejoinder” and “Review responded to” as string (alphabetically), sort “# author feedbacks done” by the first number then the second number (same as “Review done” in the “View review report” table) and sort “Last responded at” as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
5. For “Teammate review report” table, sort the first 3 columns as string and sort the last column as date. &amp;lt;br/&amp;gt;&lt;br /&gt;
6. Refactor previous implementation. There is a heavy amount of code in views that can be moved into models to make the code more DRY and follow Ruby guidelines better &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== '''Add Assignment Name Header''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to add a header to every “Review Report” view page that will show the name of the assignment that is being viewed. &lt;br /&gt;
&lt;br /&gt;
==== '''Author Feedback Report Formatting''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to format the Author Feedback Report to resolve a formatting issue when no feedback has been submitted by any student. When this is the case, the names of the participants appear in a strange horizontal format. We must resolve this so that the formatting is correct regardless of how many participants have done author feedback.&lt;br /&gt;
&lt;br /&gt;
==== '''Chrome Dropdown Freezing''' ====&lt;br /&gt;
&lt;br /&gt;
Our to reproduce the problem of the drop down freezing when viewing within a Chrome browser and if possible change the current implementation to prevent the freezing from occurring. &lt;br /&gt;
&lt;br /&gt;
==== '''Edit Author Feedback Report table headers''' ====&lt;br /&gt;
Our goal is to change the header name “Review response rejoined” to “Review responded to” and “Last rejoined at” to “Last responded at” within the author feedback report table view. &lt;br /&gt;
&lt;br /&gt;
==== '''Sorting Author Feedback Report Table''' ====&lt;br /&gt;
&lt;br /&gt;
Our goal is to refactor the sorting mechanism for sorting the author feedback report table. This will consist of four different ways to sort:&lt;br /&gt;
Sort “Rejoinder” as string (alphabetically)&lt;br /&gt;
Sort “Review responded to” as string (alphabetically)&lt;br /&gt;
Sort “# Author Feedbacks Done” by the first number and then the second number&lt;br /&gt;
Same as “Review done” in the “View review report” table&lt;br /&gt;
Sort “Last responded to” as date&lt;br /&gt;
&lt;br /&gt;
==== '''Sort Teammate Review Report table''' ====&lt;br /&gt;
Our goal is to edit the way the sorting operates for the teammate review report table.  The first three columns of the teammate review report table will be sorted as strings and the last column as date. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
==='''Files Requiring Modification'''===&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/response_report.html.haml (issue 1, 3, 4)&lt;br /&gt;
It appears this HAML file defines the dropdown that appears at the top of the “Review reports” page and renders the partials for the requested type of report when submitting the dropdown. &lt;br /&gt;
&lt;br /&gt;
* app/controllers/reports_controller.rb (issue 1)&lt;br /&gt;
&lt;br /&gt;
We will also likely need to be adding a line to determine the assignment name and pass it into the view.  &lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_feedback_report.html.erb (issue 2, 4)&lt;br /&gt;
&lt;br /&gt;
This file contains the code which generates the author Feedback reports table. This is a form that is rendered by the response_report.html.haml file when the Feedback report is requested from the dropdown. This gives us access to the column names which require change. Making the columns sortable will be done in this file.&lt;br /&gt;
&lt;br /&gt;
* app/helpers/review_mapping_helper.rb (issue 2)&lt;br /&gt;
&lt;br /&gt;
This file has code which generates the instance variables used by the Feedback reports table and it also creates the headers used by the reports table. Changes may be needed to the header to make the columns sortable.&lt;br /&gt;
&lt;br /&gt;
*  app/views/reports/_searchbox.html.erb (issue 3)&lt;br /&gt;
&lt;br /&gt;
This file contains the html erb form code for the dropdown to select which type of review the user wants to render. After reproducing and determining the root of the issue, we will likely need to make edits to this file in order to resolve the problem. This is for Chrome on Windows 10, and will have to be reproduced to see what’s causing the issue.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb (issue 4)&lt;br /&gt;
&lt;br /&gt;
This issue requires the assignment name to be displayed for the particular review report. We will use the set instance variables to display the assignment name.&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_teammate_review_report.html.erb (issue 5)&lt;br /&gt;
&lt;br /&gt;
This file contains the source for displaying the teammate review report. We will have to edit this file to adjust the sorting of the columns. &lt;br /&gt;
&lt;br /&gt;
Design Patterns aren't applicable to our project since all it involves is to make columns sortable and some isolated issues.&lt;br /&gt;
&lt;br /&gt;
== '''UML Design''' ==&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135909</id>
		<title>CSC/ECE 517 Fall 2020/oss E2072 RLM</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135909"/>
		<updated>2020-10-21T17:01:25Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2072 OSS assignment for Fall 2020, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
&lt;br /&gt;
For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:&lt;br /&gt;
* Instructor login: username -&amp;gt; instructor6,  password -&amp;gt; password&lt;br /&gt;
* Student  login: username -&amp;gt; student4340,  password -&amp;gt; password &lt;br /&gt;
* Student login: username -&amp;gt; student4405,  password -&amp;gt; password&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU and supported by MIT and the National Science Foundation. &lt;br /&gt;
&lt;br /&gt;
It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentParticipant model and Review Mapping helper. It focuses on refactoring unkept, unused and misleading methods within the aforementioned files. The project’s goal is to enhance some of the methods in use and clean up others that were either outdated or in need of improvement. Some other parts of the application were modified as well to work with our changes in the Assignment Participant model.&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
&lt;br /&gt;
Our project focused primarily on refactoring the assignment_partipant.rb Model file. The files modified for this project are:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. assignment_participant.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
3. assignment_participant_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
4. publishing_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
5. user.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
6. quiz_assignment.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
7. response.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
8. response_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Participant Model ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps students and instructors view grades and reviews, update scores, check for grading conflicts and calculate penalties. A couple of long and complex methods were refactored from this controller along with removal of some non-functional code and a few language changes to make it Ruby style.&lt;br /&gt;
Three methods in particular, namely conflict_notification ,calculate_all_penalties and edit were found to be too long and were in need of refactoring into smaller, easier to manage methods. Few more  compact methods were created for this purpose.&lt;br /&gt;
&lt;br /&gt;
There were no existing test cases for the controller. We have added a spec file named 'grades_spec.rb' under the spec folder. As no changes were done for the model, no tests for the model were included.&lt;br /&gt;
&lt;br /&gt;
=== ReviewMappingHelper ===&lt;br /&gt;
&lt;br /&gt;
This is a helper class that contained methods to help calculate and display information regarding participant reviews and the volume of each review. One non-functional method was removed from the file and two other methods were updated to support sorting the volume of an arbitrary number of review rounds.&lt;br /&gt;
&lt;br /&gt;
== List of Changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Refactor self.grant_publishing_rights to assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
WI2: Determine whether reviews_by_reviewer method is still needed. &amp;lt;br/&amp;gt;&lt;br /&gt;
WI3: Refactor copy method name &amp;lt;br/&amp;gt;&lt;br /&gt;
WI4: Refactor assign_quiz &amp;lt;br/&amp;gt;&lt;br /&gt;
WI5: Refactor Review Score &amp;lt;br/&amp;gt;&lt;br /&gt;
WI6: Rewrite Score calculation within the scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
WI7: Refactor Volume - # Distinct Words in a Review &amp;lt;br/&amp;gt;&lt;br /&gt;
WI8: Provide documentation for Compute_Assignment_Score &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
'''Refactoring Review Volume'''&lt;br /&gt;
&lt;br /&gt;
This involved three methods in review_mapping_helper.rb, sort_reviewer_by_review_volume_desc, initialize_chart_elements and display_volume_metric. The first two methods worked together to sort the reviews by the average volume of reviews in each round of an assignment and then move the data of reviews in each round from a current round to prepare to display the information in chart form. The last method was found to not be used within the entirety of the project. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. The methods were originally implemented in a way that only allowed for the information from three rounds of an assignment to be gathered. The functions had to be re-implemented using a loop that could gather and initialize the data from any given number of rounds. &lt;br /&gt;
&lt;br /&gt;
2. The display_volume_metric was no longer being used within the rest of the project and so was removed to clean up the file. &lt;br /&gt;
&lt;br /&gt;
sort_review_by_review_volume_desc loop re-implementation:&lt;br /&gt;
&lt;br /&gt;
[[File:expertiza_change_1.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
Initialize_chart_elements loop re-implementation:&lt;br /&gt;
 &lt;br /&gt;
[[File:517_screenshot3.png|500px|]] [[File:517_screenshot4.png|500px|]]&lt;br /&gt;
&lt;br /&gt;
Display_volume_metric removal: &lt;br /&gt;
&lt;br /&gt;
[[File:517_screenshot5.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Rewrite Scores Method''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The scores method returns the scores that a specific assignment_participant has received Originally, the scores method contained several convoluted method calls with some unused and commented out code. Our team was tasked with rewriting the scores method in assignment_participant.rb to make it more readable and transparent. &lt;br /&gt;
&lt;br /&gt;
The following changes were made to accomplish this task: &amp;lt;br/&amp;gt;&lt;br /&gt;
1. Removed topic_total_scores (score calculations for a microtask) and moved it into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed calculate_scores method and refactored the code into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &amp;lt;br/&amp;gt; &lt;br /&gt;
[[File:rewrite_scores_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Refactored the merge_scores method which is called by Scores. &amp;lt;br/&amp;gt;&lt;br /&gt;
* DRYed out the code by adding a new update_min_or_max method that dynamically sets the min or max &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_3a.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Refactored merge_scores to use update_min_or_max method. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_3b.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Added 6 RSPEC tests for this new update_min_or_max method &amp;lt;br/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
4. Added comments for the scores method and merge_scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;Image Here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor assign_quiz Method'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assign_quiz method was originally located in the assignment_participant.rb file and was requested to be moved into quiz_questionnaire.rb. However, upon further investigation, it was discovered that there existed two assign_quiz_dynamically methods, one which called the aforementioned assign_quiz method. Our investigation concluded that a newly constructed assign_quiz_dynamically method, located in review_mapping_controller.rb, had become the primary method of performing the tasks associated with assign_quiz and assign_quiz dynamically. Hence, following the consultation of our mentor, we elected to remove the definition and all instances of assign_quiz (assignment_participant.rb) and assign_quiz_dynamically (quiz_assignment.rb).&lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. Removed definition of assign_quiz method (assignment_participant.rb)&lt;br /&gt;
&lt;br /&gt;
[[File:remove_quiz.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
2, Removed all unused instances assign_quiz_dynamically (defined in quiz_assignment.rb)&lt;br /&gt;
* Alternative assign_quiz_dynamically method located in review_mapping_controller.rb became the primary method used in recent years&lt;br /&gt;
&lt;br /&gt;
[[File:dynamic.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
3. Ensured all instances of assign_quiz_dynamically (review_mapping_controller.rb) were untouched and operational as expected&lt;br /&gt;
* This definition does not implement assign_quiz method from assignment_participant&lt;br /&gt;
&lt;br /&gt;
4. Removed #assign_quiz spec test from assignment_participant_spec.rb (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Investigate reviews_by_reviewer Method'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reviews_by_reviewer method returns the reviews of a certain assignment_participant. However, for the past 5 years or so all reviews have been of assignment_teams, not assignment_participant. Our team was tasked with investigating the reviews_by_reviewer method in assignment_participant.rb to determine whether it is still used, or would be useful to continue maintaining. &lt;br /&gt;
&lt;br /&gt;
The following determinations were made:&lt;br /&gt;
1. Determined that all reviews are of assignment_teams and not of assignment_participant&lt;br /&gt;
2. The only calls to reviews_by_reviewer method happen in CollusionCycle. &lt;br /&gt;
3. After verifying with Yang and Dr. Gehringer, we determined that Collusion Cycle is no longer used in the application. CollusionCycle was originally a piece of code that helped detect whether bias existed when teammates gave reviews of other teammates' work. &lt;br /&gt;
4. Because CollusionCycle is unused, we deemed it appropriate to make the following changes:&lt;br /&gt;
* Removed the method definition from assignment_participant.rb&lt;br /&gt;
[[File:reviews_by_reviewer_1.png]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Removed the rspec test for this method&lt;br /&gt;
[[File:reviews_by_reviewer_2.png]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor copy Method Name'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The copy method was determined to have a misleading name for a method that copies a participant to a course. As a result, the copy method name was refactored into 'copy_participant'. &lt;br /&gt;
&lt;br /&gt;
The resulting changes were made to correspond to the name change: &lt;br /&gt;
&lt;br /&gt;
1. Refactored copy method in assignment_participant.rb into 'copy_participant'&lt;br /&gt;
&lt;br /&gt;
[[File:copy_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
2. Refactored all instances of copy_participant associated with a assignment_participant&lt;br /&gt;
* Spec test in assignment_participant_spec.rb was only instance found (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Aside from simply refactoring the name of self.grant_publishing_rights into assign_copyright, upon further investigation, we noted that the definition of the method in assignment_participant.rb, did not require the participant parameter and participant loop, but was simplified by moving this functionality to wherever the method is called in the application. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. Refactored self.grant_publishing_rights into 'assign_copyright'&lt;br /&gt;
* Refactored definition of the method in assignment_participant.rb, removing the participant parameter and participant loop; moving this functionality to wherever the method is called in the application&lt;br /&gt;
&lt;br /&gt;
[[File:assign_copyright.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
2. Altered functionality of the method call in def generate_keys (user.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
[[File:user_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
3. Altered functionality of the method call in grant_with_private_key (publishing_controller.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
[[File:pub_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
4. Built spec test for modified assign_copyright method in assignment_participant_spec.rb (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
 * Creates new RSA key-pair for a participant&lt;br /&gt;
 * Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor review_score method''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The review_score method returns the review score for a particular questionnaire. The issue originally stated that the method should be able to determine the review score for any round of review. The original method returned the first round (index position 0) review score. &lt;br /&gt;
&lt;br /&gt;
We made the following determinations:&lt;br /&gt;
1. The review_score method only returns the first round review score which is from index position 0: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. We determined that review_score method is only being called in collusion_cycle.rb, which is no longer used in the Expertiza application. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. We determined there was a reference to a “review_score” model in question.rb but there is no model that this refers to: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
Changes Made:&lt;br /&gt;
1. Since review_score was only being called in collusion_cycle.rb, and collusion_cycle.rb is no longer used in the application, we deemed it correct to remove the review_score method from assignment_participant.rb: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_3.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed the reference to “review_score” model which appeared to be made in error since there is no review_score model. This change was made in question.rb file.  &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_4.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Changes to Files === &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Response.rb''' &amp;lt;br/&amp;gt;&lt;br /&gt;
Additionally, in making some of the changes to the way expertiza calculates volumetric scores, we noticed incompatibilities because the methods in assignment_participant.rb call other methods to retrieve score information and calculations, which were hard coded for a maximum of three rounds of review. &lt;br /&gt;
&lt;br /&gt;
We identified two methods in response.rb which dealt with the comments for different rounds of reviews, but would only calculate up to three rounds. These two methods were *self.concatenate_all_review_comments* and *self.get_volume_of_review_comments*. Although these methods are in response.rb which is not the primary focus of our project, our mentor instructed us to change the related methods to be able to run their calculations for any number of rounds of reviews.  &lt;br /&gt;
&lt;br /&gt;
The original methods (before our changes) were as follows: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:response_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
As you can see, self.get_volume_of_review_comments relies and directly calls self.concantenate_all_review_comments. Thus, we needed to rewrite both of these methods to use the same convention as in sort_review_by_review_volume_desc where the calculations should be for any number of rounds, not just three. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We rewrote these two methods as follows to work with any number of rounds of reviews and comments. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:response_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the rewritten code displayed above, our team has changed both methods to function to concatenate all review comments and then get the average word volume for each of those review comments for any number of rounds. This makes the code far more functional and universal to our changes elsewhere in the application. &lt;br /&gt;
&lt;br /&gt;
We also made changes to the RSpec tests for these methods, which will be discussed in the Rspec Testing Section below.&lt;br /&gt;
&lt;br /&gt;
== Testing Details== &lt;br /&gt;
=== Test Plan ===&lt;br /&gt;
For testing our changes, we focused on updating and designing new automated ''RSpec'' tests for every method. We also made sure to design a UI test to display that more than three rounds of reviews can be displayed on a page. See the [[#UI_Testing]] section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
For RSpec testing, we focused on designing an extensive suite of rspec tests for the assignment_participant model that we primarily dealt with. However, whenever we made any sort of change, we immediately went and updated/created the test cases regarding our changes. All RSPEC test changes are listed below in the [[#RSpec_Testing]] section. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
&lt;br /&gt;
Removed assign_quiz spec test from assignment_participant_spec.rb to correlate with the deletion of the assign_quiz method itself. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:assign_quiz_spec.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
&lt;br /&gt;
Refactored copy to copy_participant in all spec test instances (assignment_participant_spec.rb). &lt;br /&gt;
&lt;br /&gt;
[[File:copy_spec.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
&lt;br /&gt;
Following refactor, a new spec test needed to be built for the modified assign_copyright method in assignment_participant_spec.rb.&lt;br /&gt;
* Creates new RSA key-pair for a participant&lt;br /&gt;
* Assigns the public key of this key-pair to the user.public_key attribute. &lt;br /&gt;
* Tests if key matches using assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:copyright_spec.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
In this test, we created a new RSA key pair in order to effectively test the functionality of the assign_copyright method. We then call the assign_copyright and pass the private key to this method. In order to test whether the function succeeded, we test to make sure that the permission_granted field is set to true for this participant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Rewrite Scores Method'''&lt;br /&gt;
As described in the previous section, during the rewrite of the scores method our team cleaned up the merge scores method as well, by creating a new update_max_or_min method and abstracting/DRYing out the code. We wanted to make sure to thoroughly test this new method by adding the following rspec tests: &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Removed topic_total_scores tests &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed calculate_scores tests &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_rewrite_scores_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We verified that the current scores tests were testing the functionality well and no changes were made to these tests. &lt;br /&gt;
&lt;br /&gt;
3. We added 6 new tests to the rspec file to test the new methods for update_max_or_min. As displayed below, we test updating the min, and the max, under three different conditions. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_rewrite_scores_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviews_by_reviewer Method'''&lt;br /&gt;
Since we decided to remove this method because it is unused in the application (besides Collusion_cycle.rb), we removed the associated rspec tests as well: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_reviews_by_reviewer.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Review Score'''&lt;br /&gt;
We also removed the Rspec tests for review_score method which we removed as stated in the previous section. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_review_score.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Collusion Cycle''' &amp;lt;br/&amp;gt;&lt;br /&gt;
As discussed in previous section, we also removed some failing tests in collusion_cycle_spec.rb, as per request from Dr. Gehringer, which began failing after we removed methods Collusion Cycle called from assignment_participant.rb. These test removals are displayed below: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_collusion_cycle_1.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_2.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_3.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_4.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_5.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Response''' &amp;lt;br/&amp;gt;&lt;br /&gt;
As discussed in a previous section, the response.rb file had to be edited so that the methods in this file are able to perform the comment volumetric calculations for any given number of rounds. Because of the changes discussed in the previous section, we had to update the corresponding Rspec tests to work with the new return format. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_response.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Following steps needs to be performed to test the volume refactoring in the UI:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Login as instructor and enter anonymized view using the manage tag.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Go to the manage tab and enter the assignments page&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose any of the listed assignments, under the action section, click “view reports”&amp;lt;br/&amp;gt;&lt;br /&gt;
   - If the course comes up with an error that means that the chosen assignment does not have any reviews. Please choose another assignment. &amp;lt;br/&amp;gt;&lt;br /&gt;
     - (This particular error is out of scope of our current project) &amp;lt;br/&amp;gt;&lt;br /&gt;
   - A good choice for an assignment would be 'Final Project (and design doc) &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Select the view button&amp;lt;br/&amp;gt;&lt;br /&gt;
5. You should see the volume of reviews by round for each reviewer.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2020-10-21_113943.png|720px]]&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
1. We found that scores are calculated in many different places and in many different ways throughout the code. An interesting future project would be to identify where these different calculations are made, and refactor so they are all made in one place for the same type of scores. This will make the code more universal and easier to follow and understand. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Currently, if there are no reviews for an assignment you are thrown an error when trying to review the report. We did not fix this, due to it being out of scope of our project, but this error could be caught and the user could be redirected which would make the project work much better.&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135908</id>
		<title>CSC/ECE 517 Fall 2020/oss E2072 RLM</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135908"/>
		<updated>2020-10-21T17:00:34Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2072 OSS assignment for Fall 2020, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
&lt;br /&gt;
For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:&lt;br /&gt;
* Instructor login: username -&amp;gt; instructor6,  password -&amp;gt; password&lt;br /&gt;
* Student  login: username -&amp;gt; student4340,  password -&amp;gt; password &lt;br /&gt;
* Student login: username -&amp;gt; student4405,  password -&amp;gt; password&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU and supported by MIT and the National Science Foundation. &lt;br /&gt;
&lt;br /&gt;
It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentParticipant model and Review Mapping helper. It focuses on refactoring unkept, unused and misleading methods within the aforementioned files. The project’s goal is to enhance some of the methods in use and clean up others that were either outdated or in need of improvement. Some other parts of the application were modified as well to work with our changes in the Assignment Participant model.&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
&lt;br /&gt;
Our project focused primarily on refactoring the assignment_partipant.rb Model file. The files modified for this project are:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. assignment_participant.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
3. assignment_participant_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
4. publishing_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
5. user.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
6. quiz_assignment.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
7. response.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
8. response_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Participant Model ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps students and instructors view grades and reviews, update scores, check for grading conflicts and calculate penalties. A couple of long and complex methods were refactored from this controller along with removal of some non-functional code and a few language changes to make it Ruby style.&lt;br /&gt;
Three methods in particular, namely conflict_notification ,calculate_all_penalties and edit were found to be too long and were in need of refactoring into smaller, easier to manage methods. Few more  compact methods were created for this purpose.&lt;br /&gt;
&lt;br /&gt;
There were no existing test cases for the controller. We have added a spec file named 'grades_spec.rb' under the spec folder. As no changes were done for the model, no tests for the model were included.&lt;br /&gt;
&lt;br /&gt;
=== ReviewMappingHelper ===&lt;br /&gt;
&lt;br /&gt;
This is a helper class that contained methods to help calculate and display information regarding participant reviews and the volume of each review. One non-functional method was removed from the file and two other methods were updated to support sorting the volume of an arbitrary number of review rounds.&lt;br /&gt;
&lt;br /&gt;
== List of Changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Refactor self.grant_publishing_rights to assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
WI2: Determine whether reviews_by_reviewer method is still needed. &amp;lt;br/&amp;gt;&lt;br /&gt;
WI3: Refactor copy method name &amp;lt;br/&amp;gt;&lt;br /&gt;
WI4: Refactor assign_quiz &amp;lt;br/&amp;gt;&lt;br /&gt;
WI5: Refactor Review Score &amp;lt;br/&amp;gt;&lt;br /&gt;
WI6: Rewrite Score calculation within the scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
WI7: Refactor Volume - # Distinct Words in a Review &amp;lt;br/&amp;gt;&lt;br /&gt;
WI8: Provide documentation for Compute_Assignment_Score &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
'''Refactoring Review Volume'''&lt;br /&gt;
&lt;br /&gt;
This involved three methods in review_mapping_helper.rb, sort_reviewer_by_review_volume_desc, initialize_chart_elements and display_volume_metric. The first two methods worked together to sort the reviews by the average volume of reviews in each round of an assignment and then move the data of reviews in each round from a current round to prepare to display the information in chart form. The last method was found to not be used within the entirety of the project. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. The methods were originally implemented in a way that only allowed for the information from three rounds of an assignment to be gathered. The functions had to be re-implemented using a loop that could gather and initialize the data from any given number of rounds. &lt;br /&gt;
&lt;br /&gt;
2. The display_volume_metric was no longer being used within the rest of the project and so was removed to clean up the file. &lt;br /&gt;
&lt;br /&gt;
sort_review_by_review_volume_desc loop re-implementation:&lt;br /&gt;
&lt;br /&gt;
[[File:expertiza_change_1.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
Initialize_chart_elements loop re-implementation:&lt;br /&gt;
 &lt;br /&gt;
[[File:517_screenshot3.png|500px|]] [[File:517_screenshot4.png|500px|]]&lt;br /&gt;
&lt;br /&gt;
Display_volume_metric removal: &lt;br /&gt;
&lt;br /&gt;
[[File:517_screenshot5.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Rewrite Scores Method''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The scores method returns the scores that a specific assignment_participant has received Originally, the scores method contained several convoluted method calls with some unused and commented out code. Our team was tasked with rewriting the scores method in assignment_participant.rb to make it more readable and transparent. &lt;br /&gt;
&lt;br /&gt;
The following changes were made to accomplish this task: &amp;lt;br/&amp;gt;&lt;br /&gt;
1. Removed topic_total_scores (score calculations for a microtask) and moved it into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed calculate_scores method and refactored the code into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &amp;lt;br/&amp;gt; &lt;br /&gt;
[[File:rewrite_scores_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Refactored the merge_scores method which is called by Scores. &amp;lt;br/&amp;gt;&lt;br /&gt;
* DRYed out the code by adding a new update_min_or_max method that dynamically sets the min or max &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_3a.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Refactored merge_scores to use update_min_or_max method. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_3b.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Added 6 RSPEC tests for this new update_min_or_max method &amp;lt;br/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
4. Added comments for the scores method and merge_scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;Image Here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor assign_quiz Method'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assign_quiz method was originally located in the assignment_participant.rb file and was requested to be moved into quiz_questionnaire.rb. However, upon further investigation, it was discovered that there existed two assign_quiz_dynamically methods, one which called the aforementioned assign_quiz method. Our investigation concluded that a newly constructed assign_quiz_dynamically method, located in review_mapping_controller.rb, had become the primary method of performing the tasks associated with assign_quiz and assign_quiz dynamically. Hence, following the consultation of our mentor, we elected to remove the definition and all instances of assign_quiz (assignment_participant.rb) and assign_quiz_dynamically (quiz_assignment.rb).&lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. Removed definition of assign_quiz method (assignment_participant.rb)&lt;br /&gt;
&lt;br /&gt;
[[File:remove_quiz.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
2, Removed all unused instances assign_quiz_dynamically (defined in quiz_assignment.rb)&lt;br /&gt;
* Alternative assign_quiz_dynamically method located in review_mapping_controller.rb became the primary method used in recent years&lt;br /&gt;
&lt;br /&gt;
[[File:dynamic.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
3. Ensured all instances of assign_quiz_dynamically (review_mapping_controller.rb) were untouched and operational as expected&lt;br /&gt;
* This definition does not implement assign_quiz method from assignment_participant&lt;br /&gt;
&lt;br /&gt;
4. Removed #assign_quiz spec test from assignment_participant_spec.rb (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Investigate reviews_by_reviewer Method'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reviews_by_reviewer method returns the reviews of a certain assignment_participant. However, for the past 5 years or so all reviews have been of assignment_teams, not assignment_participant. Our team was tasked with investigating the reviews_by_reviewer method in assignment_participant.rb to determine whether it is still used, or would be useful to continue maintaining. &lt;br /&gt;
&lt;br /&gt;
The following determinations were made:&lt;br /&gt;
1. Determined that all reviews are of assignment_teams and not of assignment_participant&lt;br /&gt;
2. The only calls to reviews_by_reviewer method happen in CollusionCycle. &lt;br /&gt;
3. After verifying with Yang and Dr. Gehringer, we determined that Collusion Cycle is no longer used in the application. CollusionCycle was originally a piece of code that helped detect whether bias existed when teammates gave reviews of other teammates' work. &lt;br /&gt;
4. Because CollusionCycle is unused, we deemed it appropriate to make the following changes:&lt;br /&gt;
* Removed the method definition from assignment_participant.rb&lt;br /&gt;
[[File:reviews_by_reviewer_1.png]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Removed the rspec test for this method&lt;br /&gt;
[[File:reviews_by_reviewer_2.png]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor copy Method Name'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The copy method was determined to have a misleading name for a method that copies a participant to a course. As a result, the copy method name was refactored into 'copy_participant'. &lt;br /&gt;
&lt;br /&gt;
The resulting changes were made to correspond to the name change: &lt;br /&gt;
&lt;br /&gt;
1. Refactored copy method in assignment_participant.rb into 'copy_participant'&lt;br /&gt;
&lt;br /&gt;
[[File:copy_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
2. Refactored all instances of copy_participant associated with a assignment_participant&lt;br /&gt;
* Spec test in assignment_participant_spec.rb was only instance found (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Aside from simply refactoring the name of self.grant_publishing_rights into assign_copyright, upon further investigation, we noted that the definition of the method in assignment_participant.rb, did not require the participant parameter and participant loop, but was simplified by moving this functionality to wherever the method is called in the application. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. Refactored self.grant_publishing_rights into 'assign_copyright'&lt;br /&gt;
* Refactored definition of the method in assignment_participant.rb, removing the participant parameter and participant loop; moving this functionality to wherever the method is called in the application&lt;br /&gt;
&lt;br /&gt;
[[File:assign_copyright.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
2. Altered functionality of the method call in def generate_keys (user.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
[[File:user_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
3. Altered functionality of the method call in grant_with_private_key (publishing_controller.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
[[File:pub_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
4. Built spec test for modified assign_copyright method in assignment_participant_spec.rb (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
 * Creates new RSA key-pair for a participant&lt;br /&gt;
 * Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor review_score method''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The review_score method returns the review score for a particular questionnaire. The issue originally stated that the method should be able to determine the review score for any round of review. The original method returned the first round (index position 0) review score. &lt;br /&gt;
&lt;br /&gt;
We made the following determinations:&lt;br /&gt;
1. The review_score method only returns the first round review score which is from index position 0: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. We determined that review_score method is only being called in collusion_cycle.rb, which is no longer used in the Expertiza application. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. We determined there was a reference to a “review_score” model in question.rb but there is no model that this refers to: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
Changes Made:&lt;br /&gt;
1. Since review_score was only being called in collusion_cycle.rb, and collusion_cycle.rb is no longer used in the application, we deemed it correct to remove the review_score method from assignment_participant.rb: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_3.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed the reference to “review_score” model which appeared to be made in error since there is no review_score model. This change was made in question.rb file.  &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_4.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Changes to Files === &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Response.rb''' &amp;lt;br/&amp;gt;&lt;br /&gt;
Additionally, in making some of the changes to the way expertiza calculates volumetric scores, we noticed incompatibilities because the methods in assignment_participant.rb call other methods to retrieve score information and calculations, which were hard coded for a maximum of three rounds of review. &lt;br /&gt;
&lt;br /&gt;
We identified two methods in response.rb which dealt with the comments for different rounds of reviews, but would only calculate up to three rounds. These two methods were *self.concatenate_all_review_comments* and *self.get_volume_of_review_comments*. Although these methods are in response.rb which is not the primary focus of our project, our mentor instructed us to change the related methods to be able to run their calculations for any number of rounds of reviews.  &lt;br /&gt;
&lt;br /&gt;
The original methods (before our changes) were as follows: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:response_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
As you can see, self.get_volume_of_review_comments relies and directly calls self.concantenate_all_review_comments. Thus, we needed to rewrite both of these methods to use the same convention as in sort_review_by_review_volume_desc where the calculations should be for any number of rounds, not just three. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We rewrote these two methods as follows to work with any number of rounds of reviews and comments. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:response_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the rewritten code displayed above, our team has changed both methods to function to concatenate all review comments and then get the average word volume for each of those review comments for any number of rounds. This makes the code far more functional and universal to our changes elsewhere in the application. &lt;br /&gt;
&lt;br /&gt;
We also made changes to the RSpec tests for these methods, which will be discussed in the Rspec Testing Section below.&lt;br /&gt;
&lt;br /&gt;
== Testing Details== &lt;br /&gt;
=== Test Plan ===&lt;br /&gt;
For testing our changes, we focused on updating and designing new automated ''RSpec'' tests for every method. We also made sure to design a UI test to display that more than three rounds of reviews can be displayed on a page. See the [[#UI_Testing]] section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
For RSpec testing, we focused on designing an extensive suite of rspec tests for the assignment_participant model that we primarily dealt with. However, whenever we made any sort of change, we immediately went and updated/created the test cases regarding our changes. All RSPEC test changes are listed below in the [[#RSpec_Testing]] section. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
&lt;br /&gt;
Removed assign_quiz spec test from assignment_participant_spec.rb to correlate with the deletion of the assign_quiz method itself. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:assign_quiz_spec.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
&lt;br /&gt;
Refactored copy to copy_participant in all spec test instances (assignment_participant_spec.rb). &lt;br /&gt;
&lt;br /&gt;
[[File:copy_spec.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
&lt;br /&gt;
Following refactor, a new spec test needed to be built for the modified assign_copyright method in assignment_participant_spec.rb.&lt;br /&gt;
* Creates new RSA key-pair for a participant&lt;br /&gt;
* Assigns the public key of this key-pair to the user.public_key attribute. &lt;br /&gt;
* Tests if key matches using assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:copyright_spec.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
In this test, we created a new RSA key pair in order to effectively test the functionality of the assign_copyright method. We then call the assign_copyright and pass the private key to this method. In order to test whether the function succeeded, we test to make sure that the permission_granted field is set to true for this participant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Rewrite Scores Method'''&lt;br /&gt;
As described in the previous section, during the rewrite of the scores method our team cleaned up the merge scores method as well, by creating a new update_max_or_min method and abstracting/DRYing out the code. We wanted to make sure to thoroughly test this new method by adding the following rspec tests: &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Removed topic_total_scores tests &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed calculate_scores tests &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_rewrite_scores_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We verified that the current scores tests were testing the functionality well and no changes were made to these tests. &lt;br /&gt;
&lt;br /&gt;
3. We added 6 new tests to the rspec file to test the new methods for update_max_or_min. As displayed below, we test updating the min, and the max, under three different conditions. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_rewrite_scores_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviews_by_reviewer Method'''&lt;br /&gt;
Since we decided to remove this method because it is unused in the application (besides Collusion_cycle.rb), we removed the associated rspec tests as well: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_reviews_by_reviewer.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Review Score'''&lt;br /&gt;
We also removed the Rspec tests for review_score method which we removed as stated in the previous section. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_review_score.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Collusion Cycle''' &amp;lt;br/&amp;gt;&lt;br /&gt;
As discussed in previous section, we also removed some failing tests in collusion_cycle_spec.rb, as per request from Dr. Gehringer, which began failing after we removed methods Collusion Cycle called from assignment_participant.rb. These test removals are displayed below: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_collusion_cycle_1.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_2.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_3.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_4.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_5.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Response''' &amp;lt;br/&amp;gt;&lt;br /&gt;
As discussed in a previous section, the response.rb file had to be edited so that the methods in this file are able to perform the comment volumetric calculations for any given number of rounds. Because of the changes discussed in the previous section, we had to update the corresponding Rspec tests to work with the new return format. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_response.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Following steps needs to be performed to test the volume refactoring in the UI:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Login as instructor and enter anonymized view using the manage tag.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Go to the manage tab and enter the assignments page&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose any of the listed assignments, under the action section, click “view reports”&amp;lt;br/&amp;gt;&lt;br /&gt;
   - If the course comes up with an error that means that the chosen assignment does not have any reviews. Please choose another assignment. (This particular error is out of scope of our current project)&amp;lt;br/&amp;gt;&lt;br /&gt;
   - A good choice for an assignment would be 'Final Project (and design doc) &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Select the view button&amp;lt;br/&amp;gt;&lt;br /&gt;
5. You should see the volume of reviews by round for each reviewer.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2020-10-21_113943.png|720px]]&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
1. We found that scores are calculated in many different places and in many different ways throughout the code. An interesting future project would be to identify where these different calculations are made, and refactor so they are all made in one place for the same type of scores. This will make the code more universal and easier to follow and understand. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Currently, if there are no reviews for an assignment you are thrown an error when trying to review the report. We did not fix this, due to it being out of scope of our project, but this error could be caught and the user could be redirected which would make the project work much better.&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135907</id>
		<title>CSC/ECE 517 Fall 2020/oss E2072 RLM</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135907"/>
		<updated>2020-10-21T16:59:54Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Scope for future improvement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2072 OSS assignment for Fall 2020, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
&lt;br /&gt;
For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:&lt;br /&gt;
* Instructor login: username -&amp;gt; instructor6,  password -&amp;gt; password&lt;br /&gt;
* Student  login: username -&amp;gt; student4340,  password -&amp;gt; password &lt;br /&gt;
* Student login: username -&amp;gt; student4405,  password -&amp;gt; password&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU and supported by MIT and the National Science Foundation. &lt;br /&gt;
&lt;br /&gt;
It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentParticipant model and Review Mapping helper. It focuses on refactoring unkept, unused and misleading methods within the aforementioned files. The project’s goal is to enhance some of the methods in use and clean up others that were either outdated or in need of improvement. Some other parts of the application were modified as well to work with our changes in the Assignment Participant model.&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
&lt;br /&gt;
Our project focused primarily on refactoring the assignment_partipant.rb Model file. The files modified for this project are:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. assignment_participant.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
3. assignment_participant_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
4. publishing_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
5. user.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
6. quiz_assignment.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
7. response.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
8. response_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Participant Model ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps students and instructors view grades and reviews, update scores, check for grading conflicts and calculate penalties. A couple of long and complex methods were refactored from this controller along with removal of some non-functional code and a few language changes to make it Ruby style.&lt;br /&gt;
Three methods in particular, namely conflict_notification ,calculate_all_penalties and edit were found to be too long and were in need of refactoring into smaller, easier to manage methods. Few more  compact methods were created for this purpose.&lt;br /&gt;
&lt;br /&gt;
There were no existing test cases for the controller. We have added a spec file named 'grades_spec.rb' under the spec folder. As no changes were done for the model, no tests for the model were included.&lt;br /&gt;
&lt;br /&gt;
=== ReviewMappingHelper ===&lt;br /&gt;
&lt;br /&gt;
This is a helper class that contained methods to help calculate and display information regarding participant reviews and the volume of each review. One non-functional method was removed from the file and two other methods were updated to support sorting the volume of an arbitrary number of review rounds.&lt;br /&gt;
&lt;br /&gt;
== List of Changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Refactor self.grant_publishing_rights to assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
WI2: Determine whether reviews_by_reviewer method is still needed. &amp;lt;br/&amp;gt;&lt;br /&gt;
WI3: Refactor copy method name &amp;lt;br/&amp;gt;&lt;br /&gt;
WI4: Refactor assign_quiz &amp;lt;br/&amp;gt;&lt;br /&gt;
WI5: Refactor Review Score &amp;lt;br/&amp;gt;&lt;br /&gt;
WI6: Rewrite Score calculation within the scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
WI7: Refactor Volume - # Distinct Words in a Review &amp;lt;br/&amp;gt;&lt;br /&gt;
WI8: Provide documentation for Compute_Assignment_Score &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
'''Refactoring Review Volume'''&lt;br /&gt;
&lt;br /&gt;
This involved three methods in review_mapping_helper.rb, sort_reviewer_by_review_volume_desc, initialize_chart_elements and display_volume_metric. The first two methods worked together to sort the reviews by the average volume of reviews in each round of an assignment and then move the data of reviews in each round from a current round to prepare to display the information in chart form. The last method was found to not be used within the entirety of the project. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. The methods were originally implemented in a way that only allowed for the information from three rounds of an assignment to be gathered. The functions had to be re-implemented using a loop that could gather and initialize the data from any given number of rounds. &lt;br /&gt;
&lt;br /&gt;
2. The display_volume_metric was no longer being used within the rest of the project and so was removed to clean up the file. &lt;br /&gt;
&lt;br /&gt;
sort_review_by_review_volume_desc loop re-implementation:&lt;br /&gt;
&lt;br /&gt;
[[File:expertiza_change_1.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
Initialize_chart_elements loop re-implementation:&lt;br /&gt;
 &lt;br /&gt;
[[File:517_screenshot3.png|500px|]] [[File:517_screenshot4.png|500px|]]&lt;br /&gt;
&lt;br /&gt;
Display_volume_metric removal: &lt;br /&gt;
&lt;br /&gt;
[[File:517_screenshot5.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Rewrite Scores Method''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The scores method returns the scores that a specific assignment_participant has received Originally, the scores method contained several convoluted method calls with some unused and commented out code. Our team was tasked with rewriting the scores method in assignment_participant.rb to make it more readable and transparent. &lt;br /&gt;
&lt;br /&gt;
The following changes were made to accomplish this task: &amp;lt;br/&amp;gt;&lt;br /&gt;
1. Removed topic_total_scores (score calculations for a microtask) and moved it into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed calculate_scores method and refactored the code into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &amp;lt;br/&amp;gt; &lt;br /&gt;
[[File:rewrite_scores_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Refactored the merge_scores method which is called by Scores. &amp;lt;br/&amp;gt;&lt;br /&gt;
* DRYed out the code by adding a new update_min_or_max method that dynamically sets the min or max &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_3a.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Refactored merge_scores to use update_min_or_max method. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_3b.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Added 6 RSPEC tests for this new update_min_or_max method &amp;lt;br/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
4. Added comments for the scores method and merge_scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;Image Here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor assign_quiz Method'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assign_quiz method was originally located in the assignment_participant.rb file and was requested to be moved into quiz_questionnaire.rb. However, upon further investigation, it was discovered that there existed two assign_quiz_dynamically methods, one which called the aforementioned assign_quiz method. Our investigation concluded that a newly constructed assign_quiz_dynamically method, located in review_mapping_controller.rb, had become the primary method of performing the tasks associated with assign_quiz and assign_quiz dynamically. Hence, following the consultation of our mentor, we elected to remove the definition and all instances of assign_quiz (assignment_participant.rb) and assign_quiz_dynamically (quiz_assignment.rb).&lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. Removed definition of assign_quiz method (assignment_participant.rb)&lt;br /&gt;
&lt;br /&gt;
[[File:remove_quiz.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
2, Removed all unused instances assign_quiz_dynamically (defined in quiz_assignment.rb)&lt;br /&gt;
* Alternative assign_quiz_dynamically method located in review_mapping_controller.rb became the primary method used in recent years&lt;br /&gt;
&lt;br /&gt;
[[File:dynamic.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
3. Ensured all instances of assign_quiz_dynamically (review_mapping_controller.rb) were untouched and operational as expected&lt;br /&gt;
* This definition does not implement assign_quiz method from assignment_participant&lt;br /&gt;
&lt;br /&gt;
4. Removed #assign_quiz spec test from assignment_participant_spec.rb (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Investigate reviews_by_reviewer Method'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reviews_by_reviewer method returns the reviews of a certain assignment_participant. However, for the past 5 years or so all reviews have been of assignment_teams, not assignment_participant. Our team was tasked with investigating the reviews_by_reviewer method in assignment_participant.rb to determine whether it is still used, or would be useful to continue maintaining. &lt;br /&gt;
&lt;br /&gt;
The following determinations were made:&lt;br /&gt;
1. Determined that all reviews are of assignment_teams and not of assignment_participant&lt;br /&gt;
2. The only calls to reviews_by_reviewer method happen in CollusionCycle. &lt;br /&gt;
3. After verifying with Yang and Dr. Gehringer, we determined that Collusion Cycle is no longer used in the application. CollusionCycle was originally a piece of code that helped detect whether bias existed when teammates gave reviews of other teammates' work. &lt;br /&gt;
4. Because CollusionCycle is unused, we deemed it appropriate to make the following changes:&lt;br /&gt;
* Removed the method definition from assignment_participant.rb&lt;br /&gt;
[[File:reviews_by_reviewer_1.png]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Removed the rspec test for this method&lt;br /&gt;
[[File:reviews_by_reviewer_2.png]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor copy Method Name'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The copy method was determined to have a misleading name for a method that copies a participant to a course. As a result, the copy method name was refactored into 'copy_participant'. &lt;br /&gt;
&lt;br /&gt;
The resulting changes were made to correspond to the name change: &lt;br /&gt;
&lt;br /&gt;
1. Refactored copy method in assignment_participant.rb into 'copy_participant'&lt;br /&gt;
&lt;br /&gt;
[[File:copy_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
2. Refactored all instances of copy_participant associated with a assignment_participant&lt;br /&gt;
* Spec test in assignment_participant_spec.rb was only instance found (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Aside from simply refactoring the name of self.grant_publishing_rights into assign_copyright, upon further investigation, we noted that the definition of the method in assignment_participant.rb, did not require the participant parameter and participant loop, but was simplified by moving this functionality to wherever the method is called in the application. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. Refactored self.grant_publishing_rights into 'assign_copyright'&lt;br /&gt;
* Refactored definition of the method in assignment_participant.rb, removing the participant parameter and participant loop; moving this functionality to wherever the method is called in the application&lt;br /&gt;
&lt;br /&gt;
[[File:assign_copyright.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
2. Altered functionality of the method call in def generate_keys (user.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
[[File:user_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
3. Altered functionality of the method call in grant_with_private_key (publishing_controller.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
[[File:pub_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
4. Built spec test for modified assign_copyright method in assignment_participant_spec.rb (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
 * Creates new RSA key-pair for a participant&lt;br /&gt;
 * Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor review_score method''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The review_score method returns the review score for a particular questionnaire. The issue originally stated that the method should be able to determine the review score for any round of review. The original method returned the first round (index position 0) review score. &lt;br /&gt;
&lt;br /&gt;
We made the following determinations:&lt;br /&gt;
1. The review_score method only returns the first round review score which is from index position 0: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. We determined that review_score method is only being called in collusion_cycle.rb, which is no longer used in the Expertiza application. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. We determined there was a reference to a “review_score” model in question.rb but there is no model that this refers to: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
Changes Made:&lt;br /&gt;
1. Since review_score was only being called in collusion_cycle.rb, and collusion_cycle.rb is no longer used in the application, we deemed it correct to remove the review_score method from assignment_participant.rb: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_3.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed the reference to “review_score” model which appeared to be made in error since there is no review_score model. This change was made in question.rb file.  &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_4.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Changes to Files === &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Response.rb''' &amp;lt;br/&amp;gt;&lt;br /&gt;
Additionally, in making some of the changes to the way expertiza calculates volumetric scores, we noticed incompatibilities because the methods in assignment_participant.rb call other methods to retrieve score information and calculations, which were hard coded for a maximum of three rounds of review. &lt;br /&gt;
&lt;br /&gt;
We identified two methods in response.rb which dealt with the comments for different rounds of reviews, but would only calculate up to three rounds. These two methods were *self.concatenate_all_review_comments* and *self.get_volume_of_review_comments*. Although these methods are in response.rb which is not the primary focus of our project, our mentor instructed us to change the related methods to be able to run their calculations for any number of rounds of reviews.  &lt;br /&gt;
&lt;br /&gt;
The original methods (before our changes) were as follows: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:response_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
As you can see, self.get_volume_of_review_comments relies and directly calls self.concantenate_all_review_comments. Thus, we needed to rewrite both of these methods to use the same convention as in sort_review_by_review_volume_desc where the calculations should be for any number of rounds, not just three. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We rewrote these two methods as follows to work with any number of rounds of reviews and comments. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:response_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the rewritten code displayed above, our team has changed both methods to function to concatenate all review comments and then get the average word volume for each of those review comments for any number of rounds. This makes the code far more functional and universal to our changes elsewhere in the application. &lt;br /&gt;
&lt;br /&gt;
We also made changes to the RSpec tests for these methods, which will be discussed in the Rspec Testing Section below.&lt;br /&gt;
&lt;br /&gt;
== Testing Details== &lt;br /&gt;
=== Test Plan ===&lt;br /&gt;
For testing our changes, we focused on updating and designing new automated ''RSpec'' tests for every method. We also made sure to design a UI test to display that more than three rounds of reviews can be displayed on a page. See the [[#UI_Testing]] section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
For RSpec testing, we focused on designing an extensive suite of rspec tests for the assignment_participant model that we primarily dealt with. However, whenever we made any sort of change, we immediately went and updated/created the test cases regarding our changes. All RSPEC test changes are listed below in the [[#RSpec_Testing]] section. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
&lt;br /&gt;
Removed assign_quiz spec test from assignment_participant_spec.rb to correlate with the deletion of the assign_quiz method itself. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:assign_quiz_spec.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
&lt;br /&gt;
Refactored copy to copy_participant in all spec test instances (assignment_participant_spec.rb). &lt;br /&gt;
&lt;br /&gt;
[[File:copy_spec.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
&lt;br /&gt;
Following refactor, a new spec test needed to be built for the modified assign_copyright method in assignment_participant_spec.rb.&lt;br /&gt;
* Creates new RSA key-pair for a participant&lt;br /&gt;
* Assigns the public key of this key-pair to the user.public_key attribute. &lt;br /&gt;
* Tests if key matches using assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:copyright_spec.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
In this test, we created a new RSA key pair in order to effectively test the functionality of the assign_copyright method. We then call the assign_copyright and pass the private key to this method. In order to test whether the function succeeded, we test to make sure that the permission_granted field is set to true for this participant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Rewrite Scores Method'''&lt;br /&gt;
As described in the previous section, during the rewrite of the scores method our team cleaned up the merge scores method as well, by creating a new update_max_or_min method and abstracting/DRYing out the code. We wanted to make sure to thoroughly test this new method by adding the following rspec tests: &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Removed topic_total_scores tests &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed calculate_scores tests &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_rewrite_scores_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We verified that the current scores tests were testing the functionality well and no changes were made to these tests. &lt;br /&gt;
&lt;br /&gt;
3. We added 6 new tests to the rspec file to test the new methods for update_max_or_min. As displayed below, we test updating the min, and the max, under three different conditions. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_rewrite_scores_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviews_by_reviewer Method'''&lt;br /&gt;
Since we decided to remove this method because it is unused in the application (besides Collusion_cycle.rb), we removed the associated rspec tests as well: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_reviews_by_reviewer.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Review Score'''&lt;br /&gt;
We also removed the Rspec tests for review_score method which we removed as stated in the previous section. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_review_score.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Collusion Cycle''' &amp;lt;br/&amp;gt;&lt;br /&gt;
As discussed in previous section, we also removed some failing tests in collusion_cycle_spec.rb, as per request from Dr. Gehringer, which began failing after we removed methods Collusion Cycle called from assignment_participant.rb. These test removals are displayed below: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_collusion_cycle_1.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_2.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_3.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_4.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_5.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Response''' &amp;lt;br/&amp;gt;&lt;br /&gt;
As discussed in a previous section, the response.rb file had to be edited so that the methods in this file are able to perform the comment volumetric calculations for any given number of rounds. Because of the changes discussed in the previous section, we had to update the corresponding Rspec tests to work with the new return format. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_response.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Following steps needs to be performed to test the volume refactoring in the UI:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Login as instructor and enter anonymized view using the manage tag.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Go to the manage tab and enter the assignments page&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose any of the listed assignments, under the action section, click “view reports”&amp;lt;br/&amp;gt;&lt;br /&gt;
   - If the course comes up with an error that means that the chosen assignment does not have any reviews. Please choose another assignment.&amp;lt;br/&amp;gt;&lt;br /&gt;
   - A good choice for an assignment would be 'Final Project (and design doc) &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Select the view button&amp;lt;br/&amp;gt;&lt;br /&gt;
5. You should see the volume of reviews by round for each reviewer.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2020-10-21_113943.png|720px]]&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
1. We found that scores are calculated in many different places and in many different ways throughout the code. An interesting future project would be to identify where these different calculations are made, and refactor so they are all made in one place for the same type of scores. This will make the code more universal and easier to follow and understand. &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Currently, if there are no reviews for an assignment you are thrown an error when trying to review the report. We did not fix this, due to it being out of scope of our project, but this error could be caught and the user could be redirected which would make the project work much better.&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135906</id>
		<title>CSC/ECE 517 Fall 2020/oss E2072 RLM</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135906"/>
		<updated>2020-10-21T16:59:37Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Scope for future improvement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2072 OSS assignment for Fall 2020, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
&lt;br /&gt;
For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:&lt;br /&gt;
* Instructor login: username -&amp;gt; instructor6,  password -&amp;gt; password&lt;br /&gt;
* Student  login: username -&amp;gt; student4340,  password -&amp;gt; password &lt;br /&gt;
* Student login: username -&amp;gt; student4405,  password -&amp;gt; password&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU and supported by MIT and the National Science Foundation. &lt;br /&gt;
&lt;br /&gt;
It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentParticipant model and Review Mapping helper. It focuses on refactoring unkept, unused and misleading methods within the aforementioned files. The project’s goal is to enhance some of the methods in use and clean up others that were either outdated or in need of improvement. Some other parts of the application were modified as well to work with our changes in the Assignment Participant model.&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
&lt;br /&gt;
Our project focused primarily on refactoring the assignment_partipant.rb Model file. The files modified for this project are:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. assignment_participant.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
3. assignment_participant_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
4. publishing_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
5. user.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
6. quiz_assignment.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
7. response.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
8. response_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Participant Model ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps students and instructors view grades and reviews, update scores, check for grading conflicts and calculate penalties. A couple of long and complex methods were refactored from this controller along with removal of some non-functional code and a few language changes to make it Ruby style.&lt;br /&gt;
Three methods in particular, namely conflict_notification ,calculate_all_penalties and edit were found to be too long and were in need of refactoring into smaller, easier to manage methods. Few more  compact methods were created for this purpose.&lt;br /&gt;
&lt;br /&gt;
There were no existing test cases for the controller. We have added a spec file named 'grades_spec.rb' under the spec folder. As no changes were done for the model, no tests for the model were included.&lt;br /&gt;
&lt;br /&gt;
=== ReviewMappingHelper ===&lt;br /&gt;
&lt;br /&gt;
This is a helper class that contained methods to help calculate and display information regarding participant reviews and the volume of each review. One non-functional method was removed from the file and two other methods were updated to support sorting the volume of an arbitrary number of review rounds.&lt;br /&gt;
&lt;br /&gt;
== List of Changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Refactor self.grant_publishing_rights to assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
WI2: Determine whether reviews_by_reviewer method is still needed. &amp;lt;br/&amp;gt;&lt;br /&gt;
WI3: Refactor copy method name &amp;lt;br/&amp;gt;&lt;br /&gt;
WI4: Refactor assign_quiz &amp;lt;br/&amp;gt;&lt;br /&gt;
WI5: Refactor Review Score &amp;lt;br/&amp;gt;&lt;br /&gt;
WI6: Rewrite Score calculation within the scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
WI7: Refactor Volume - # Distinct Words in a Review &amp;lt;br/&amp;gt;&lt;br /&gt;
WI8: Provide documentation for Compute_Assignment_Score &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
'''Refactoring Review Volume'''&lt;br /&gt;
&lt;br /&gt;
This involved three methods in review_mapping_helper.rb, sort_reviewer_by_review_volume_desc, initialize_chart_elements and display_volume_metric. The first two methods worked together to sort the reviews by the average volume of reviews in each round of an assignment and then move the data of reviews in each round from a current round to prepare to display the information in chart form. The last method was found to not be used within the entirety of the project. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. The methods were originally implemented in a way that only allowed for the information from three rounds of an assignment to be gathered. The functions had to be re-implemented using a loop that could gather and initialize the data from any given number of rounds. &lt;br /&gt;
&lt;br /&gt;
2. The display_volume_metric was no longer being used within the rest of the project and so was removed to clean up the file. &lt;br /&gt;
&lt;br /&gt;
sort_review_by_review_volume_desc loop re-implementation:&lt;br /&gt;
&lt;br /&gt;
[[File:expertiza_change_1.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
Initialize_chart_elements loop re-implementation:&lt;br /&gt;
 &lt;br /&gt;
[[File:517_screenshot3.png|500px|]] [[File:517_screenshot4.png|500px|]]&lt;br /&gt;
&lt;br /&gt;
Display_volume_metric removal: &lt;br /&gt;
&lt;br /&gt;
[[File:517_screenshot5.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Rewrite Scores Method''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The scores method returns the scores that a specific assignment_participant has received Originally, the scores method contained several convoluted method calls with some unused and commented out code. Our team was tasked with rewriting the scores method in assignment_participant.rb to make it more readable and transparent. &lt;br /&gt;
&lt;br /&gt;
The following changes were made to accomplish this task: &amp;lt;br/&amp;gt;&lt;br /&gt;
1. Removed topic_total_scores (score calculations for a microtask) and moved it into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed calculate_scores method and refactored the code into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &amp;lt;br/&amp;gt; &lt;br /&gt;
[[File:rewrite_scores_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Refactored the merge_scores method which is called by Scores. &amp;lt;br/&amp;gt;&lt;br /&gt;
* DRYed out the code by adding a new update_min_or_max method that dynamically sets the min or max &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_3a.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Refactored merge_scores to use update_min_or_max method. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_3b.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Added 6 RSPEC tests for this new update_min_or_max method &amp;lt;br/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
4. Added comments for the scores method and merge_scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;Image Here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor assign_quiz Method'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assign_quiz method was originally located in the assignment_participant.rb file and was requested to be moved into quiz_questionnaire.rb. However, upon further investigation, it was discovered that there existed two assign_quiz_dynamically methods, one which called the aforementioned assign_quiz method. Our investigation concluded that a newly constructed assign_quiz_dynamically method, located in review_mapping_controller.rb, had become the primary method of performing the tasks associated with assign_quiz and assign_quiz dynamically. Hence, following the consultation of our mentor, we elected to remove the definition and all instances of assign_quiz (assignment_participant.rb) and assign_quiz_dynamically (quiz_assignment.rb).&lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. Removed definition of assign_quiz method (assignment_participant.rb)&lt;br /&gt;
&lt;br /&gt;
[[File:remove_quiz.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
2, Removed all unused instances assign_quiz_dynamically (defined in quiz_assignment.rb)&lt;br /&gt;
* Alternative assign_quiz_dynamically method located in review_mapping_controller.rb became the primary method used in recent years&lt;br /&gt;
&lt;br /&gt;
[[File:dynamic.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
3. Ensured all instances of assign_quiz_dynamically (review_mapping_controller.rb) were untouched and operational as expected&lt;br /&gt;
* This definition does not implement assign_quiz method from assignment_participant&lt;br /&gt;
&lt;br /&gt;
4. Removed #assign_quiz spec test from assignment_participant_spec.rb (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Investigate reviews_by_reviewer Method'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reviews_by_reviewer method returns the reviews of a certain assignment_participant. However, for the past 5 years or so all reviews have been of assignment_teams, not assignment_participant. Our team was tasked with investigating the reviews_by_reviewer method in assignment_participant.rb to determine whether it is still used, or would be useful to continue maintaining. &lt;br /&gt;
&lt;br /&gt;
The following determinations were made:&lt;br /&gt;
1. Determined that all reviews are of assignment_teams and not of assignment_participant&lt;br /&gt;
2. The only calls to reviews_by_reviewer method happen in CollusionCycle. &lt;br /&gt;
3. After verifying with Yang and Dr. Gehringer, we determined that Collusion Cycle is no longer used in the application. CollusionCycle was originally a piece of code that helped detect whether bias existed when teammates gave reviews of other teammates' work. &lt;br /&gt;
4. Because CollusionCycle is unused, we deemed it appropriate to make the following changes:&lt;br /&gt;
* Removed the method definition from assignment_participant.rb&lt;br /&gt;
[[File:reviews_by_reviewer_1.png]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Removed the rspec test for this method&lt;br /&gt;
[[File:reviews_by_reviewer_2.png]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor copy Method Name'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The copy method was determined to have a misleading name for a method that copies a participant to a course. As a result, the copy method name was refactored into 'copy_participant'. &lt;br /&gt;
&lt;br /&gt;
The resulting changes were made to correspond to the name change: &lt;br /&gt;
&lt;br /&gt;
1. Refactored copy method in assignment_participant.rb into 'copy_participant'&lt;br /&gt;
&lt;br /&gt;
[[File:copy_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
2. Refactored all instances of copy_participant associated with a assignment_participant&lt;br /&gt;
* Spec test in assignment_participant_spec.rb was only instance found (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Aside from simply refactoring the name of self.grant_publishing_rights into assign_copyright, upon further investigation, we noted that the definition of the method in assignment_participant.rb, did not require the participant parameter and participant loop, but was simplified by moving this functionality to wherever the method is called in the application. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. Refactored self.grant_publishing_rights into 'assign_copyright'&lt;br /&gt;
* Refactored definition of the method in assignment_participant.rb, removing the participant parameter and participant loop; moving this functionality to wherever the method is called in the application&lt;br /&gt;
&lt;br /&gt;
[[File:assign_copyright.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
2. Altered functionality of the method call in def generate_keys (user.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
[[File:user_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
3. Altered functionality of the method call in grant_with_private_key (publishing_controller.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
[[File:pub_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
4. Built spec test for modified assign_copyright method in assignment_participant_spec.rb (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
 * Creates new RSA key-pair for a participant&lt;br /&gt;
 * Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor review_score method''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The review_score method returns the review score for a particular questionnaire. The issue originally stated that the method should be able to determine the review score for any round of review. The original method returned the first round (index position 0) review score. &lt;br /&gt;
&lt;br /&gt;
We made the following determinations:&lt;br /&gt;
1. The review_score method only returns the first round review score which is from index position 0: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. We determined that review_score method is only being called in collusion_cycle.rb, which is no longer used in the Expertiza application. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. We determined there was a reference to a “review_score” model in question.rb but there is no model that this refers to: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
Changes Made:&lt;br /&gt;
1. Since review_score was only being called in collusion_cycle.rb, and collusion_cycle.rb is no longer used in the application, we deemed it correct to remove the review_score method from assignment_participant.rb: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_3.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed the reference to “review_score” model which appeared to be made in error since there is no review_score model. This change was made in question.rb file.  &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_4.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Changes to Files === &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Response.rb''' &amp;lt;br/&amp;gt;&lt;br /&gt;
Additionally, in making some of the changes to the way expertiza calculates volumetric scores, we noticed incompatibilities because the methods in assignment_participant.rb call other methods to retrieve score information and calculations, which were hard coded for a maximum of three rounds of review. &lt;br /&gt;
&lt;br /&gt;
We identified two methods in response.rb which dealt with the comments for different rounds of reviews, but would only calculate up to three rounds. These two methods were *self.concatenate_all_review_comments* and *self.get_volume_of_review_comments*. Although these methods are in response.rb which is not the primary focus of our project, our mentor instructed us to change the related methods to be able to run their calculations for any number of rounds of reviews.  &lt;br /&gt;
&lt;br /&gt;
The original methods (before our changes) were as follows: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:response_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
As you can see, self.get_volume_of_review_comments relies and directly calls self.concantenate_all_review_comments. Thus, we needed to rewrite both of these methods to use the same convention as in sort_review_by_review_volume_desc where the calculations should be for any number of rounds, not just three. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We rewrote these two methods as follows to work with any number of rounds of reviews and comments. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:response_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the rewritten code displayed above, our team has changed both methods to function to concatenate all review comments and then get the average word volume for each of those review comments for any number of rounds. This makes the code far more functional and universal to our changes elsewhere in the application. &lt;br /&gt;
&lt;br /&gt;
We also made changes to the RSpec tests for these methods, which will be discussed in the Rspec Testing Section below.&lt;br /&gt;
&lt;br /&gt;
== Testing Details== &lt;br /&gt;
=== Test Plan ===&lt;br /&gt;
For testing our changes, we focused on updating and designing new automated ''RSpec'' tests for every method. We also made sure to design a UI test to display that more than three rounds of reviews can be displayed on a page. See the [[#UI_Testing]] section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
For RSpec testing, we focused on designing an extensive suite of rspec tests for the assignment_participant model that we primarily dealt with. However, whenever we made any sort of change, we immediately went and updated/created the test cases regarding our changes. All RSPEC test changes are listed below in the [[#RSpec_Testing]] section. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
&lt;br /&gt;
Removed assign_quiz spec test from assignment_participant_spec.rb to correlate with the deletion of the assign_quiz method itself. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:assign_quiz_spec.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
&lt;br /&gt;
Refactored copy to copy_participant in all spec test instances (assignment_participant_spec.rb). &lt;br /&gt;
&lt;br /&gt;
[[File:copy_spec.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
&lt;br /&gt;
Following refactor, a new spec test needed to be built for the modified assign_copyright method in assignment_participant_spec.rb.&lt;br /&gt;
* Creates new RSA key-pair for a participant&lt;br /&gt;
* Assigns the public key of this key-pair to the user.public_key attribute. &lt;br /&gt;
* Tests if key matches using assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:copyright_spec.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
In this test, we created a new RSA key pair in order to effectively test the functionality of the assign_copyright method. We then call the assign_copyright and pass the private key to this method. In order to test whether the function succeeded, we test to make sure that the permission_granted field is set to true for this participant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Rewrite Scores Method'''&lt;br /&gt;
As described in the previous section, during the rewrite of the scores method our team cleaned up the merge scores method as well, by creating a new update_max_or_min method and abstracting/DRYing out the code. We wanted to make sure to thoroughly test this new method by adding the following rspec tests: &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Removed topic_total_scores tests &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed calculate_scores tests &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_rewrite_scores_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We verified that the current scores tests were testing the functionality well and no changes were made to these tests. &lt;br /&gt;
&lt;br /&gt;
3. We added 6 new tests to the rspec file to test the new methods for update_max_or_min. As displayed below, we test updating the min, and the max, under three different conditions. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_rewrite_scores_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviews_by_reviewer Method'''&lt;br /&gt;
Since we decided to remove this method because it is unused in the application (besides Collusion_cycle.rb), we removed the associated rspec tests as well: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_reviews_by_reviewer.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Review Score'''&lt;br /&gt;
We also removed the Rspec tests for review_score method which we removed as stated in the previous section. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_review_score.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Collusion Cycle''' &amp;lt;br/&amp;gt;&lt;br /&gt;
As discussed in previous section, we also removed some failing tests in collusion_cycle_spec.rb, as per request from Dr. Gehringer, which began failing after we removed methods Collusion Cycle called from assignment_participant.rb. These test removals are displayed below: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_collusion_cycle_1.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_2.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_3.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_4.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_5.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Response''' &amp;lt;br/&amp;gt;&lt;br /&gt;
As discussed in a previous section, the response.rb file had to be edited so that the methods in this file are able to perform the comment volumetric calculations for any given number of rounds. Because of the changes discussed in the previous section, we had to update the corresponding Rspec tests to work with the new return format. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_response.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Following steps needs to be performed to test the volume refactoring in the UI:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Login as instructor and enter anonymized view using the manage tag.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Go to the manage tab and enter the assignments page&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose any of the listed assignments, under the action section, click “view reports”&amp;lt;br/&amp;gt;&lt;br /&gt;
   - If the course comes up with an error that means that the chosen assignment does not have any reviews. Please choose another assignment.&amp;lt;br/&amp;gt;&lt;br /&gt;
   - A good choice for an assignment would be 'Final Project (and design doc) &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Select the view button&amp;lt;br/&amp;gt;&lt;br /&gt;
5. You should see the volume of reviews by round for each reviewer.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2020-10-21_113943.png|720px]]&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
1. We found that scores are calculated in many different places and in many different ways throughout the code. An interesting future project would be to identify where these different calculations are made, and refactor so they are all made in one place for the same type of scores. This will make the code more universal and easier to follow and understand.&lt;br /&gt;
2. Currently, if there are no reviews for an assignment you are thrown an error when trying to review the report. We did not fix this, due to it being out of scope of our project, but this error could be caught and the user could be redirected which would make the project work much better.&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135905</id>
		<title>CSC/ECE 517 Fall 2020/oss E2072 RLM</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135905"/>
		<updated>2020-10-21T15:42:36Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2072 OSS assignment for Fall 2020, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
&lt;br /&gt;
For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:&lt;br /&gt;
* Instructor login: username -&amp;gt; instructor6,  password -&amp;gt; password&lt;br /&gt;
* Student  login: username -&amp;gt; student4340,  password -&amp;gt; password &lt;br /&gt;
* Student login: username -&amp;gt; student4405,  password -&amp;gt; password&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU and supported by MIT and the National Science Foundation. &lt;br /&gt;
&lt;br /&gt;
It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentParticipant model and Review Mapping helper. It focuses on refactoring unkept, unused and misleading methods within the aforementioned files. The project’s goal is to enhance some of the methods in use and clean up others that were either outdated or in need of improvement. Some other parts of the application were modified as well to work with our changes in the Assignment Participant model.&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
&lt;br /&gt;
Our project focused primarily on refactoring the assignment_partipant.rb Model file. The files modified for this project are:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. assignment_participant.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
3. assignment_participant_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
4. publishing_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
5. user.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
6. quiz_assignment.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
7. response.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
8. response_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Participant Model ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps students and instructors view grades and reviews, update scores, check for grading conflicts and calculate penalties. A couple of long and complex methods were refactored from this controller along with removal of some non-functional code and a few language changes to make it Ruby style.&lt;br /&gt;
Three methods in particular, namely conflict_notification ,calculate_all_penalties and edit were found to be too long and were in need of refactoring into smaller, easier to manage methods. Few more  compact methods were created for this purpose.&lt;br /&gt;
&lt;br /&gt;
There were no existing test cases for the controller. We have added a spec file named 'grades_spec.rb' under the spec folder. As no changes were done for the model, no tests for the model were included.&lt;br /&gt;
&lt;br /&gt;
=== ReviewMappingHelper ===&lt;br /&gt;
&lt;br /&gt;
This is a helper class that contained methods to help calculate and display information regarding participant reviews and the volume of each review. One non-functional method was removed from the file and two other methods were updated to support sorting the volume of an arbitrary number of review rounds.&lt;br /&gt;
&lt;br /&gt;
== List of Changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Refactor self.grant_publishing_rights to assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
WI2: Determine whether reviews_by_reviewer method is still needed. &amp;lt;br/&amp;gt;&lt;br /&gt;
WI3: Refactor copy method name &amp;lt;br/&amp;gt;&lt;br /&gt;
WI4: Refactor assign_quiz &amp;lt;br/&amp;gt;&lt;br /&gt;
WI5: Refactor Review Score &amp;lt;br/&amp;gt;&lt;br /&gt;
WI6: Rewrite Score calculation within the scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
WI7: Refactor Volume - # Distinct Words in a Review &amp;lt;br/&amp;gt;&lt;br /&gt;
WI8: Provide documentation for Compute_Assignment_Score &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
'''Refactoring Review Volume'''&lt;br /&gt;
&lt;br /&gt;
This involved three methods in review_mapping_helper.rb, sort_reviewer_by_review_volume_desc, initialize_chart_elements and display_volume_metric. The first two methods worked together to sort the reviews by the average volume of reviews in each round of an assignment and then move the data of reviews in each round from a current round to prepare to display the information in chart form. The last method was found to not be used within the entirety of the project. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. The methods were originally implemented in a way that only allowed for the information from three rounds of an assignment to be gathered. The functions had to be re-implemented using a loop that could gather and initialize the data from any given number of rounds. &lt;br /&gt;
&lt;br /&gt;
2. The display_volume_metric was no longer being used within the rest of the project and so was removed to clean up the file. &lt;br /&gt;
&lt;br /&gt;
sort_review_by_review_volume_desc loop re-implementation:&lt;br /&gt;
&lt;br /&gt;
[[File:expertiza_change_1.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
Initialize_chart_elements loop re-implementation:&lt;br /&gt;
 &lt;br /&gt;
[[File:517_screenshot3.png|500px|]] [[File:517_screenshot4.png|500px|]]&lt;br /&gt;
&lt;br /&gt;
Display_volume_metric removal: &lt;br /&gt;
&lt;br /&gt;
[[File:517_screenshot5.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Rewrite Scores Method''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The scores method returns the scores that a specific assignment_participant has received Originally, the scores method contained several convoluted method calls with some unused and commented out code. Our team was tasked with rewriting the scores method in assignment_participant.rb to make it more readable and transparent. &lt;br /&gt;
&lt;br /&gt;
The following changes were made to accomplish this task: &amp;lt;br/&amp;gt;&lt;br /&gt;
1. Removed topic_total_scores (score calculations for a microtask) and moved it into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed calculate_scores method and refactored the code into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &amp;lt;br/&amp;gt; &lt;br /&gt;
[[File:rewrite_scores_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Refactored the merge_scores method which is called by Scores. &amp;lt;br/&amp;gt;&lt;br /&gt;
* DRYed out the code by adding a new update_min_or_max method that dynamically sets the min or max &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_3a.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Refactored merge_scores to use update_min_or_max method. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_3b.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Added 6 RSPEC tests for this new update_min_or_max method &amp;lt;br/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
4. Added comments for the scores method and merge_scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;Image Here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor assign_quiz Method'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assign_quiz method was originally located in the assignment_participant.rb file and was requested to be moved into quiz_questionnaire.rb. However, upon further investigation, it was discovered that there existed two assign_quiz_dynamically methods, one which called the aforementioned assign_quiz method. Our investigation concluded that a newly constructed assign_quiz_dynamically method, located in review_mapping_controller.rb, had become the primary method of performing the tasks associated with assign_quiz and assign_quiz dynamically. Hence, following the consultation of our mentor, we elected to remove the definition and all instances of assign_quiz (assignment_participant.rb) and assign_quiz_dynamically (quiz_assignment.rb).&lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. Removed definition of assign_quiz method (assignment_participant.rb)&lt;br /&gt;
&lt;br /&gt;
[[File:remove_quiz.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
2, Removed all unused instances assign_quiz_dynamically (defined in quiz_assignment.rb)&lt;br /&gt;
* Alternative assign_quiz_dynamically method located in review_mapping_controller.rb became the primary method used in recent years&lt;br /&gt;
&lt;br /&gt;
[[File:dynamic.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
3. Ensured all instances of assign_quiz_dynamically (review_mapping_controller.rb) were untouched and operational as expected&lt;br /&gt;
* This definition does not implement assign_quiz method from assignment_participant&lt;br /&gt;
&lt;br /&gt;
4. Removed #assign_quiz spec test from assignment_participant_spec.rb (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Investigate reviews_by_reviewer Method'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reviews_by_reviewer method returns the reviews of a certain assignment_participant. However, for the past 5 years or so all reviews have been of assignment_teams, not assignment_participant. Our team was tasked with investigating the reviews_by_reviewer method in assignment_participant.rb to determine whether it is still used, or would be useful to continue maintaining. &lt;br /&gt;
&lt;br /&gt;
The following determinations were made:&lt;br /&gt;
1. Determined that all reviews are of assignment_teams and not of assignment_participant&lt;br /&gt;
2. The only calls to reviews_by_reviewer method happen in CollusionCycle. &lt;br /&gt;
3. After verifying with Yang and Dr. Gehringer, we determined that Collusion Cycle is no longer used in the application. CollusionCycle was originally a piece of code that helped detect whether bias existed when teammates gave reviews of other teammates' work. &lt;br /&gt;
4. Because CollusionCycle is unused, we deemed it appropriate to make the following changes:&lt;br /&gt;
* Removed the method definition from assignment_participant.rb&lt;br /&gt;
[[File:reviews_by_reviewer_1.png]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Removed the rspec test for this method&lt;br /&gt;
[[File:reviews_by_reviewer_2.png]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor copy Method Name'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The copy method was determined to have a misleading name for a method that copies a participant to a course. As a result, the copy method name was refactored into 'copy_participant'. &lt;br /&gt;
&lt;br /&gt;
The resulting changes were made to correspond to the name change: &lt;br /&gt;
&lt;br /&gt;
1. Refactored copy method in assignment_participant.rb into 'copy_participant'&lt;br /&gt;
&lt;br /&gt;
[[File:copy_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
2. Refactored all instances of copy_participant associated with a assignment_participant&lt;br /&gt;
* Spec test in assignment_participant_spec.rb was only instance found (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Aside from simply refactoring the name of self.grant_publishing_rights into assign_copyright, upon further investigation, we noted that the definition of the method in assignment_participant.rb, did not require the participant parameter and participant loop, but was simplified by moving this functionality to wherever the method is called in the application. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. Refactored self.grant_publishing_rights into 'assign_copyright'&lt;br /&gt;
* Refactored definition of the method in assignment_participant.rb, removing the participant parameter and participant loop; moving this functionality to wherever the method is called in the application&lt;br /&gt;
&lt;br /&gt;
[[File:assign_copyright.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
2. Altered functionality of the method call in def generate_keys (user.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
[[File:user_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
3. Altered functionality of the method call in grant_with_private_key (publishing_controller.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
[[File:pub_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
4. Built spec test for modified assign_copyright method in assignment_participant_spec.rb (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
 * Creates new RSA key-pair for a participant&lt;br /&gt;
 * Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor review_score method''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The review_score method returns the review score for a particular questionnaire. The issue originally stated that the method should be able to determine the review score for any round of review. The original method returned the first round (index position 0) review score. &lt;br /&gt;
&lt;br /&gt;
We made the following determinations:&lt;br /&gt;
1. The review_score method only returns the first round review score which is from index position 0: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. We determined that review_score method is only being called in collusion_cycle.rb, which is no longer used in the Expertiza application. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. We determined there was a reference to a “review_score” model in question.rb but there is no model that this refers to: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
Changes Made:&lt;br /&gt;
1. Since review_score was only being called in collusion_cycle.rb, and collusion_cycle.rb is no longer used in the application, we deemed it correct to remove the review_score method from assignment_participant.rb: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_3.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed the reference to “review_score” model which appeared to be made in error since there is no review_score model. This change was made in question.rb file.  &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_4.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Changes to Files === &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Response.rb''' &amp;lt;br/&amp;gt;&lt;br /&gt;
Additionally, in making some of the changes to the way expertiza calculates volumetric scores, we noticed incompatibilities because the methods in assignment_participant.rb call other methods to retrieve score information and calculations, which were hard coded for a maximum of three rounds of review. &lt;br /&gt;
&lt;br /&gt;
We identified two methods in response.rb which dealt with the comments for different rounds of reviews, but would only calculate up to three rounds. These two methods were *self.concatenate_all_review_comments* and *self.get_volume_of_review_comments*. Although these methods are in response.rb which is not the primary focus of our project, our mentor instructed us to change the related methods to be able to run their calculations for any number of rounds of reviews.  &lt;br /&gt;
&lt;br /&gt;
The original methods (before our changes) were as follows: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:response_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
As you can see, self.get_volume_of_review_comments relies and directly calls self.concantenate_all_review_comments. Thus, we needed to rewrite both of these methods to use the same convention as in sort_review_by_review_volume_desc where the calculations should be for any number of rounds, not just three. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We rewrote these two methods as follows to work with any number of rounds of reviews and comments. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:response_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the rewritten code displayed above, our team has changed both methods to function to concatenate all review comments and then get the average word volume for each of those review comments for any number of rounds. This makes the code far more functional and universal to our changes elsewhere in the application. &lt;br /&gt;
&lt;br /&gt;
We also made changes to the RSpec tests for these methods, which will be discussed in the Rspec Testing Section below.&lt;br /&gt;
&lt;br /&gt;
== Testing Details== &lt;br /&gt;
=== Test Plan ===&lt;br /&gt;
For testing our changes, we focused on updating and designing new automated ''RSpec'' tests for every method. We also made sure to design a UI test to display that more than three rounds of reviews can be displayed on a page. See the [[#UI_Testing]] section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
For RSpec testing, we focused on designing an extensive suite of rspec tests for the assignment_participant model that we primarily dealt with. However, whenever we made any sort of change, we immediately went and updated/created the test cases regarding our changes. All RSPEC test changes are listed below in the [[#RSpec_Testing]] section. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
&lt;br /&gt;
Removed assign_quiz spec test from assignment_participant_spec.rb to correlate with the deletion of the assign_quiz method itself. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:assign_quiz_spec.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
&lt;br /&gt;
Refactored copy to copy_participant in all spec test instances (assignment_participant_spec.rb). &lt;br /&gt;
&lt;br /&gt;
[[File:copy_spec.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
&lt;br /&gt;
Following refactor, a new spec test needed to be built for the modified assign_copyright method in assignment_participant_spec.rb.&lt;br /&gt;
* Creates new RSA key-pair for a participant&lt;br /&gt;
* Assigns the public key of this key-pair to the user.public_key attribute. &lt;br /&gt;
* Tests if key matches using assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:copyright_spec.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
In this test, we created a new RSA key pair in order to effectively test the functionality of the assign_copyright method. We then call the assign_copyright and pass the private key to this method. In order to test whether the function succeeded, we test to make sure that the permission_granted field is set to true for this participant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Rewrite Scores Method'''&lt;br /&gt;
As described in the previous section, during the rewrite of the scores method our team cleaned up the merge scores method as well, by creating a new update_max_or_min method and abstracting/DRYing out the code. We wanted to make sure to thoroughly test this new method by adding the following rspec tests: &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Removed topic_total_scores tests &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed calculate_scores tests &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_rewrite_scores_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We verified that the current scores tests were testing the functionality well and no changes were made to these tests. &lt;br /&gt;
&lt;br /&gt;
3. We added 6 new tests to the rspec file to test the new methods for update_max_or_min. As displayed below, we test updating the min, and the max, under three different conditions. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_rewrite_scores_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviews_by_reviewer Method'''&lt;br /&gt;
Since we decided to remove this method because it is unused in the application (besides Collusion_cycle.rb), we removed the associated rspec tests as well: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_reviews_by_reviewer.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Review Score'''&lt;br /&gt;
We also removed the Rspec tests for review_score method which we removed as stated in the previous section. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_review_score.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Collusion Cycle''' &amp;lt;br/&amp;gt;&lt;br /&gt;
As discussed in previous section, we also removed some failing tests in collusion_cycle_spec.rb, as per request from Dr. Gehringer, which began failing after we removed methods Collusion Cycle called from assignment_participant.rb. These test removals are displayed below: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_collusion_cycle_1.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_2.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_3.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_4.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_5.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Response''' &amp;lt;br/&amp;gt;&lt;br /&gt;
As discussed in a previous section, the response.rb file had to be edited so that the methods in this file are able to perform the comment volumetric calculations for any given number of rounds. Because of the changes discussed in the previous section, we had to update the corresponding Rspec tests to work with the new return format. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_response.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Following steps needs to be performed to test the volume refactoring in the UI:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Login as instructor and enter anonymized view using the manage tag.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Go to the manage tab and enter the assignments page&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose any of the listed assignments, under the action section, click “view reports”&amp;lt;br/&amp;gt;&lt;br /&gt;
   - If the course comes up with an error that means that the chosen assignment does not have any reviews. Please choose another assignment.&amp;lt;br/&amp;gt;&lt;br /&gt;
   - A good choice for an assignment would be 'Final Project (and design doc) &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Select the view button&amp;lt;br/&amp;gt;&lt;br /&gt;
5. You should see the volume of reviews by round for each reviewer.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2020-10-21_113943.png|720px]]&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
1. We found that scores are calculated in many different places and in many different ways throughout the code. An interesting future project would be to identify where these different calculations are made, and refactor so they are all made in one place for the same type of scores. This will make the code more universal and easier to follow and understand.&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot_2020-10-21_113943.png&amp;diff=135904</id>
		<title>File:Screenshot 2020-10-21 113943.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot_2020-10-21_113943.png&amp;diff=135904"/>
		<updated>2020-10-21T15:40:52Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135632</id>
		<title>CSC/ECE 517 Fall 2020/oss E2072 RLM</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135632"/>
		<updated>2020-10-20T00:52:27Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2072 OSS assignment for Fall 2020, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
&lt;br /&gt;
For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:&lt;br /&gt;
* Instructor login: username -&amp;gt; instructor6,  password -&amp;gt; password&lt;br /&gt;
* Student  login: username -&amp;gt; student4340,  password -&amp;gt; password &lt;br /&gt;
* Student login: username -&amp;gt; student4405,  password -&amp;gt; password&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU and supported by MIT and the National Science Foundation. &lt;br /&gt;
&lt;br /&gt;
It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentParticipant model and Review Mapping helper. It focuses on refactoring unkept, unused and misleading methods within the aforementioned files. The project’s goal is to enhance some of the methods in use and clean up others that were either outdated or in need of improvement. Some other parts of the application were modified as well to work with our changes in the Assignment Participant model.&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
&lt;br /&gt;
Our project focused primarily on refactoring the assignment_partipant.rb Model file. The files modified for this project are:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. assignment_participant.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
3. assignment_participant_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
4. publishing_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
5. user.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
6. quiz_assignment.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
7. response.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
8. response_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Participant Model ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps students and instructors view grades and reviews, update scores, check for grading conflicts and calculate penalties. A couple of long and complex methods were refactored from this controller along with removal of some non-functional code and a few language changes to make it Ruby style.&lt;br /&gt;
Three methods in particular, namely conflict_notification ,calculate_all_penalties and edit were found to be too long and were in need of refactoring into smaller, easier to manage methods. Few more  compact methods were created for this purpose.&lt;br /&gt;
&lt;br /&gt;
There were no existing test cases for the controller. We have added a spec file named 'grades_spec.rb' under the spec folder. As no changes were done for the model, no tests for the model were included.&lt;br /&gt;
&lt;br /&gt;
=== ReviewMappingHelper ===&lt;br /&gt;
&lt;br /&gt;
This is a helper class that contained methods to help calculate and display information regarding participant reviews and the volume of each review. One non-functional method was removed from the file and two other methods were updated to support sorting the volume of an arbitrary number of review rounds.&lt;br /&gt;
&lt;br /&gt;
== List of Changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Refactor self.grant_publishing_rights to assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
WI2: Determine whether reviews_by_reviewer method is still needed. &amp;lt;br/&amp;gt;&lt;br /&gt;
WI3: Refactor copy method name &amp;lt;br/&amp;gt;&lt;br /&gt;
WI4: Refactor assign_quiz &amp;lt;br/&amp;gt;&lt;br /&gt;
WI5: Refactor Review Score &amp;lt;br/&amp;gt;&lt;br /&gt;
WI6: Rewrite Score calculation within the scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
WI7: Refactor Volume - # Distinct Words in a Review &amp;lt;br/&amp;gt;&lt;br /&gt;
WI8: Provide documentation for Compute_Assignment_Score &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
'''Refactoring Review Volume'''&lt;br /&gt;
&lt;br /&gt;
This involved three methods in review_mapping_helper.rb, sort_reviewer_by_review_volume_desc, initialize_chart_elements and display_volume_metric. The first two methods worked together to sort the reviews by the average volume of reviews in each round of an assignment and then move the data of reviews in each round from a current round to prepare to display the information in chart form. The last method was found to not be used within the entirety of the project. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. The methods were originally implemented in a way that only allowed for the information from three rounds of an assignment to be gathered. The functions had to be re-implemented using a loop that could gather and initialize the data from any given number of rounds. &lt;br /&gt;
&lt;br /&gt;
2. The display_volume_metric was no longer being used within the rest of the project and so was removed to clean up the file. &lt;br /&gt;
&lt;br /&gt;
sort_review_by_review_volume_desc loop re-implementation:&lt;br /&gt;
&lt;br /&gt;
[[File:expertiza_change_1.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
Initialize_chart_elements loop re-implementation:&lt;br /&gt;
 &lt;br /&gt;
[[File:517_screenshot3.png|500px|]] [[File:517_screenshot4.png|500px|]]&lt;br /&gt;
&lt;br /&gt;
Display_volume_metric removal: &lt;br /&gt;
&lt;br /&gt;
[[File:517_screenshot5.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Rewrite Scores Method''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The scores method returns the scores that a specific assignment_participant has received Originally, the scores method contained several convoluted method calls with some unused and commented out code. Our team was tasked with rewriting the scores method in assignment_participant.rb to make it more readable and transparent. &lt;br /&gt;
&lt;br /&gt;
The following changes were made to accomplish this task: &amp;lt;br/&amp;gt;&lt;br /&gt;
1. Removed topic_total_scores (score calculations for a microtask) and moved it into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed calculate_scores method and refactored the code into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &amp;lt;br/&amp;gt; &lt;br /&gt;
[[File:rewrite_scores_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Refactored the merge_scores method which is called by Scores. &amp;lt;br/&amp;gt;&lt;br /&gt;
* DRYed out the code by adding a new update_min_or_max method that dynamically sets the min or max &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_3a.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Refactored merge_scores to use update_min_or_max method. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rewrite_scores_3b.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Added 6 RSPEC tests for this new update_min_or_max method &amp;lt;br/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
4. Added comments for the scores method and merge_scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;Image Here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor assign_quiz Method'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assign_quiz method was originally located in the assignment_participant.rb file and was requested to be moved into quiz_questionnaire.rb. However, upon further investigation, it was discovered that there existed two assign_quiz_dynamically methods, one which called the aforementioned assign_quiz method. Our investigation concluded that a newly constructed assign_quiz_dynamically method, located in review_mapping_controller.rb, had become the primary method of performing the tasks associated with assign_quiz and assign_quiz dynamically. Hence, following the consultation of our mentor, we elected to remove the definition and all instances of assign_quiz (assignment_participant.rb) and assign_quiz_dynamically (quiz_assignment.rb).&lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. Removed definition of assign_quiz method (assignment_participant.rb)&lt;br /&gt;
&lt;br /&gt;
[[File:remove_quiz.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
2, Removed all unused instances assign_quiz_dynamically (defined in quiz_assignment.rb)&lt;br /&gt;
* Alternative assign_quiz_dynamically method located in review_mapping_controller.rb became the primary method used in recent years&lt;br /&gt;
&lt;br /&gt;
[[File:dynamic.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
3. Ensured all instances of assign_quiz_dynamically (review_mapping_controller.rb) were untouched and operational as expected&lt;br /&gt;
* This definition does not implement assign_quiz method from assignment_participant&lt;br /&gt;
&lt;br /&gt;
4. Removed #assign_quiz spec test from assignment_participant_spec.rb (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Investigate reviews_by_reviewer Method'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reviews_by_reviewer method returns the reviews of a certain assignment_participant. However, for the past 5 years or so all reviews have been of assignment_teams, not assignment_participant. Our team was tasked with investigating the reviews_by_reviewer method in assignment_participant.rb to determine whether it is still used, or would be useful to continue maintaining. &lt;br /&gt;
&lt;br /&gt;
The following determinations were made:&lt;br /&gt;
1. Determined that all reviews are of assignment_teams and not of assignment_participant&lt;br /&gt;
2. The only calls to reviews_by_reviewer method happen in CollusionCycle. &lt;br /&gt;
3. After verifying with Yang and Dr. Gehringer, we determined that Collusion Cycle is no longer used in the application. CollusionCycle was originally a piece of code that helped detect whether bias existed when teammates gave reviews of other teammates' work. &lt;br /&gt;
4. Because CollusionCycle is unused, we deemed it appropriate to make the following changes:&lt;br /&gt;
* Removed the method definition from assignment_participant.rb&lt;br /&gt;
[[File:reviews_by_reviewer_1.png]] &amp;lt;br/&amp;gt;&lt;br /&gt;
* Removed the rspec test for this method&lt;br /&gt;
[[File:reviews_by_reviewer_2.png]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor copy Method Name'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The copy method was determined to have a misleading name for a method that copies a participant to a course. As a result, the copy method name was refactored into 'copy_participant'. &lt;br /&gt;
&lt;br /&gt;
The resulting changes were made to correspond to the name change: &lt;br /&gt;
&lt;br /&gt;
1. Refactored copy method in assignment_participant.rb into 'copy_participant'&lt;br /&gt;
&lt;br /&gt;
[[File:copy_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
2. Refactored all instances of copy_participant associated with a assignment_participant&lt;br /&gt;
* Spec test in assignment_participant_spec.rb was only instance found (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Aside from simply refactoring the name of self.grant_publishing_rights into assign_copyright, upon further investigation, we noted that the definition of the method in assignment_participant.rb, did not require the participant parameter and participant loop, but was simplified by moving this functionality to wherever the method is called in the application. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. Refactored self.grant_publishing_rights into 'assign_copyright'&lt;br /&gt;
* Refactored definition of the method in assignment_participant.rb, removing the participant parameter and participant loop; moving this functionality to wherever the method is called in the application&lt;br /&gt;
&lt;br /&gt;
[[File:assign_copyright.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
2. Altered functionality of the method call in def generate_keys (user.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
[[File:user_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
3. Altered functionality of the method call in grant_with_private_key (publishing_controller.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
[[File:pub_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
4. Built spec test for modified assign_copyright method in assignment_participant_spec.rb (see &amp;quot;Testing Details&amp;quot;)&lt;br /&gt;
 * Creates new RSA key-pair for a participant&lt;br /&gt;
 * Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Refactor review_score method''' &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The review_score method returns the review score for a particular questionnaire. The issue originally stated that the method should be able to determine the review score for any round of review. The original method returned the first round (index position 0) review score. &lt;br /&gt;
&lt;br /&gt;
We made the following determinations:&lt;br /&gt;
1. The review_score method only returns the first round review score which is from index position 0: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. We determined that review_score method is only being called in collusion_cycle.rb, which is no longer used in the Expertiza application. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. We determined there was a reference to a “review_score” model in question.rb but there is no model that this refers to: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
Changes Made:&lt;br /&gt;
1. Since review_score was only being called in collusion_cycle.rb, and collusion_cycle.rb is no longer used in the application, we deemed it correct to remove the review_score method from assignment_participant.rb: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_3.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed the reference to “review_score” model which appeared to be made in error since there is no review_score model. This change was made in question.rb file.  &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:review_score_4.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional Changes to Files === &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Response.rb''' &amp;lt;br/&amp;gt;&lt;br /&gt;
Additionally, in making some of the changes to the way expertiza calculates volumetric scores, we noticed incompatibilities because the methods in assignment_participant.rb call other methods to retrieve score information and calculations, which were hard coded for a maximum of three rounds of review. &lt;br /&gt;
&lt;br /&gt;
We identified two methods in response.rb which dealt with the comments for different rounds of reviews, but would only calculate up to three rounds. These two methods were *self.concatenate_all_review_comments* and *self.get_volume_of_review_comments*. Although these methods are in response.rb which is not the primary focus of our project, our mentor instructed us to change the related methods to be able to run their calculations for any number of rounds of reviews.  &lt;br /&gt;
&lt;br /&gt;
The original methods (before our changes) were as follows: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:response_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
As you can see, self.get_volume_of_review_comments relies and directly calls self.concantenate_all_review_comments. Thus, we needed to rewrite both of these methods to use the same convention as in sort_review_by_review_volume_desc where the calculations should be for any number of rounds, not just three. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We rewrote these two methods as follows to work with any number of rounds of reviews and comments. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:response_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the rewritten code displayed above, our team has changed both methods to function to concatenate all review comments and then get the average word volume for each of those review comments for any number of rounds. This makes the code far more functional and universal to our changes elsewhere in the application. &lt;br /&gt;
&lt;br /&gt;
We also made changes to the RSpec tests for these methods, which will be discussed in the Rspec Testing Section below.&lt;br /&gt;
&lt;br /&gt;
== Testing Details== &lt;br /&gt;
=== Test Plan ===&lt;br /&gt;
For testing our changes, we focused on updating and designing new automated ''RSpec'' tests for every method. We also made sure to design a UI test to display that more than three rounds of reviews can be displayed on a page. See the [[#UI_Testing]] section. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
For RSpec testing, we focused on designing an extensive suite of rspec tests for the assignment_participant model that we primarily dealt with. However, whenever we made any sort of change, we immediately went and updated/created the test cases regarding our changes. All RSPEC test changes are listed below in the [[#RSpec_Testing]] section. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
&lt;br /&gt;
Removed assign_quiz spec test from assignment_participant_spec.rb to correlate with the deletion of the assign_quiz method itself. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:assign_quiz_spec.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
&lt;br /&gt;
Refactored copy to copy_participant in all spec test instances (assignment_participant_spec.rb). &lt;br /&gt;
&lt;br /&gt;
[[File:copy_spec.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
&lt;br /&gt;
Following refactor, a new spec test needed to be built for the modified assign_copyright method in assignment_participant_spec.rb.&lt;br /&gt;
* Creates new RSA key-pair for a participant&lt;br /&gt;
* Assigns the public key of this key-pair to the user.public_key attribute. &lt;br /&gt;
* Tests if key matches using assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:copyright_spec.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
In this test, we created a new RSA key pair in order to effectively test the functionality of the assign_copyright method. We then call the assign_copyright and pass the private key to this method. In order to test whether the function succeeded, we test to make sure that the permission_granted field is set to true for this participant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Rewrite Scores Method'''&lt;br /&gt;
As described in the previous section, during the rewrite of the scores method our team cleaned up the merge scores method as well, by creating a new update_max_or_min method and abstracting/DRYing out the code. We wanted to make sure to thoroughly test this new method by adding the following rspec tests: &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Removed topic_total_scores tests &amp;lt;br/&amp;gt;&lt;br /&gt;
2. Removed calculate_scores tests &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_rewrite_scores_1.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We verified that the current scores tests were testing the functionality well and no changes were made to these tests. &lt;br /&gt;
&lt;br /&gt;
3. We added 6 new tests to the rspec file to test the new methods for update_max_or_min. As displayed below, we test updating the min, and the max, under three different conditions. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_rewrite_scores_2.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reviews_by_reviewer Method'''&lt;br /&gt;
Since we decided to remove this method because it is unused in the application (besides Collusion_cycle.rb), we removed the associated rspec tests as well: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_reviews_by_reviewer.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Review Score'''&lt;br /&gt;
We also removed the Rspec tests for review_score method which we removed as stated in the previous section. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_review_score.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Collusion Cycle''' &amp;lt;br/&amp;gt;&lt;br /&gt;
As discussed in previous section, we also removed some failing tests in collusion_cycle_spec.rb, as per request from Dr. Gehringer, which began failing after we removed methods Collusion Cycle called from assignment_participant.rb. These test removals are displayed below: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_collusion_cycle_1.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_2.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_3.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_4.png|720px|]] &lt;br /&gt;
[[File:spec_collusion_cycle_5.png|720px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Response''' &amp;lt;br/&amp;gt;&lt;br /&gt;
As discussed in a previous section, the response.rb file had to be edited so that the methods in this file are able to perform the comment volumetric calculations for any given number of rounds. Because of the changes discussed in the previous section, we had to update the corresponding Rspec tests to work with the new return format. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:spec_response.png|1080px|]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Following steps needs to be performed to test the volume refactoring in the UI:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Login as instructor and enter anonymized view using the manage tag.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Go to the manage tab and enter the assignments page&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose any of the listed assignments, under the action section, click “view reports”&amp;lt;br/&amp;gt;&lt;br /&gt;
   - If the course comes up with an error that means that the chosen assignment does not have any reviews. Please choose another assignment.&amp;lt;br/&amp;gt;&lt;br /&gt;
   - A good choice for an assignment would be 'Final Project (and design doc) &amp;lt;br/&amp;gt;&lt;br /&gt;
4. Select the view button&amp;lt;br/&amp;gt;&lt;br /&gt;
5. You should see the volume of reviews by round for each reviewer.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
1. We found that scores are calculated in many different places and in many different ways throughout the code. An interesting future project would be to identify where these different calculations are made, and refactor so they are all made in one place for the same type of scores. This will make the code more universal and easier to follow and understand.&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135189</id>
		<title>CSC/ECE 517 Fall 2020/oss E2072 RLM</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135189"/>
		<updated>2020-10-14T13:35:27Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Solutions Implemented and Delivered */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2072 OSS assignment for Fall 2020, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
&lt;br /&gt;
For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:&lt;br /&gt;
* Instructor login: username -&amp;gt; instructor6,  password -&amp;gt; password&lt;br /&gt;
* Student  login: username -&amp;gt; student4340,  password -&amp;gt; password &lt;br /&gt;
* Student login: username -&amp;gt; student4405,  password -&amp;gt; password&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU and supported by MIT and the National Science Foundation. &lt;br /&gt;
&lt;br /&gt;
It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentParticipant model and Review Mapping helper. It focuses on refactoring unkept, unused and misleading methods within the aforementioned files. The project’s goal is to enhance some of the methods in use and clean up others that were either outdated or in need of improvement.&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
Our project focused primarily on refactoring the assignment_partipant.rb Model file. The files modified for this project are:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. assignment_participant.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
3. assignment_participant_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
4. publishing_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
5. user.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
6. quiz_assignment.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Participant Model ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps students and instructors view grades and reviews, update scores, check for grading conflicts and calculate penalties. A couple of long and complex methods were refactored from this controller along with removal of some non-functional code and a few language changes to make it Ruby style.&lt;br /&gt;
Three methods in particular, namely conflict_notification ,calculate_all_penalties and edit were found to be too long and were in need of refactoring into smaller, easier to manage methods. Few more  compact methods were created for this purpose.&lt;br /&gt;
&lt;br /&gt;
There were no existing test cases for the controller. We have added a spec file named 'grades_spec.rb' under the spec folder. As no changes were done for the model, no tests for the model were included.&lt;br /&gt;
&lt;br /&gt;
=== ReviewMappingHelper ===&lt;br /&gt;
&lt;br /&gt;
This is a helper class that contained methods to help calculate and display information regarding participant reviews and the volume of each review. One non-functional method was removed from the file and two other methods were updated to support sorting the volume of an arbitrary number of review rounds. &lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Refactor self.grant_publishing_rights to assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
WI2: Determine whether reviews_by_reviewer method is still needed. &amp;lt;br/&amp;gt;&lt;br /&gt;
WI3: Refactor copy method name &amp;lt;br/&amp;gt;&lt;br /&gt;
WI4: Refactor assign_quiz &amp;lt;br/&amp;gt;&lt;br /&gt;
WI5: Refactor Review Score &amp;lt;br/&amp;gt;&lt;br /&gt;
WI6: Rewrite Score calculation within the scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
WI7: Refactor Volume - # Distinct Words in a Review &amp;lt;br/&amp;gt;&lt;br /&gt;
WI8: Provide documentation for Compute_Assignment_Score &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
'''Refactoring Review Volume'''&lt;br /&gt;
&lt;br /&gt;
This involved three methods in review_mapping_helper.rb, sort_reviewer_by_review_volume_desc, initialize_chart_elements and display_volume_metric. The first two methods worked together to sort the reviews by the average volume of reviews in each round of an assignment and then move the data of reviews in each round from a current round to prepare to display the information in chart form. The last method was found to not be used within the entirety of the project. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. The methods were originally implemented in a way that only allowed for the information from three rounds of an assignment to be gathered. The functions had to be re-implemented using a loop that could gather and initialize the data from any given number of rounds. &lt;br /&gt;
&lt;br /&gt;
2. The display_volume_metric was no longer being used within the rest of the project and so was removed to clean up the file. &lt;br /&gt;
&lt;br /&gt;
sort_review_by_review_volume_desc loop re-implementation:&lt;br /&gt;
&lt;br /&gt;
[[File:expertiza_change_1.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
Initialize_chart_elements loop re-implementation:&lt;br /&gt;
 &lt;br /&gt;
[[File:517_screenshot3.png|500px|]] [[File:517_screenshot4.png|500px|]]&lt;br /&gt;
&lt;br /&gt;
Display_volume_metric removal: &lt;br /&gt;
&lt;br /&gt;
[[File:517_screenshot5.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Rewrite Scores Method'''&lt;br /&gt;
The scores method returns the scores that a specific assignment_participant has received Originally, the scores method contained several convoluted method calls with some unused and commented out code. Our team was tasked with rewriting the scores method in assignment_participant.rb to make it more readable and transparent. &lt;br /&gt;
&lt;br /&gt;
The following changes were made to accomplish this task:&lt;br /&gt;
Removed topic_total_scores (score calculations for a microtask) and moved it into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &lt;br /&gt;
&lt;br /&gt;
Removed calculate_scores method and refactored the code into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Refactored the merge_scores method which is called by Scores.&lt;br /&gt;
DRYed out the code by adding a new update_min_or_max method that dynamically sets the min or max&lt;br /&gt;
&lt;br /&gt;
Refactored merge_scores to use update_min_or_max method.&lt;br /&gt;
&lt;br /&gt;
Added 6 RSPEC tests for this new update_min_or_max method&lt;br /&gt;
 &lt;br /&gt;
Added comments for the scores method and merge_scores method&lt;br /&gt;
&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
The assign_quiz method was originally located in the assignment_participant.rb file and was requested to be moved into quiz_questionnaire.rb. However, upon further investigation, it was discovered that there existed two assign_quiz_dynamically methods, one which called the aforementioned assign_quiz method. Our investigation concluded that a newly constructed assign_quiz_dynamically method, located in review_mapping_controller.rb, had become the primary method of performing the tasks associated with assign_quiz and assign_quiz dynamically. Hence, following the consultation of our mentor, we elected to remove the definition and all instances of assign_quiz (assignment_participant.rb) and assign_quiz_dynamically (quiz_assignment.rb).&lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
Removed all instances of assign_quiz method (defined in assignment_participant.rb)&lt;br /&gt;
&lt;br /&gt;
Removed all unused instances assign_quiz_dynamically (defined in quiz_assignment.rb)&lt;br /&gt;
Alternative assign_quiz_dynamically method located in review_mapping_controller.rb became the integral method used in recent years&lt;br /&gt;
&lt;br /&gt;
Ensured all instances of assign_quiz_dynamically (review_mapping_controller.rb) were untouched and operational as expected&lt;br /&gt;
This version does not invoke any assign_quiz method&lt;br /&gt;
Removed #assign_quiz spec test from assignment_participant_spec.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Investigate reviews_by_reviewer Method'''&lt;br /&gt;
The reviews_by_reviewer method returns the reviews of a certain assignment_participant. However, for the past 5 years or so all reviews have been of assignment_teams, not assignment_participant. Our team was tasked with investigating the reviews_by_reviewer method in assignment_participant.rb to determine whether it is still used, or would be useful to continue maintaining. &lt;br /&gt;
&lt;br /&gt;
The following determinations were made:&lt;br /&gt;
Determined that all reviews are of assignment_teams and not of assignment_participant&lt;br /&gt;
The only calls to reviews_by_reviewer method happen in CollusionCycle. &lt;br /&gt;
After verifying with Yang and Dr. Gehringer, we determined that Collusion Cycle is no longer used in the application. CollusionCycle was originally a piece of code that helped detect whether bias existed when teammates gave reviews of other teammates' work. &lt;br /&gt;
Because CollusionCycle is unused, we deemed it appropriate to make the following changes:&lt;br /&gt;
Removed the method definition from assignment_participant.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Removed the rspec test for this method&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
The copy method was determined to have a misleading name for a method that copies a participant to a course. As a result, the copy method name was refactored into 'copy_participant'. &lt;br /&gt;
&lt;br /&gt;
The resulting changes were made to correspond to the name change: &lt;br /&gt;
&lt;br /&gt;
1. Refactored copy method in assignment_participant.rb into 'copy_participant'&lt;br /&gt;
&lt;br /&gt;
[[File:copy_part.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
2. Refactored all instances of copy_participant associated with a assignment_participant&lt;br /&gt;
* Spec test in assignment_participant_spec.rb was only instance found &lt;br /&gt;
&lt;br /&gt;
[[File:copy_spec.png|720px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
Aside from simply refactoring the name of self.grant_publishing_rights into assign_copyright, upon further investigation, we noted that the definition of the method in assignment_participant.rb, did not require the participant parameter and participant loop, but was simplified by moving this functionality to wherever the method is called in the application. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
Refactored self.grant_publishing_rights into 'assign_copyright'&lt;br /&gt;
Refactored definition of the method in assignment_participant.rb, removing the participant parameter and participant loop; moving this functionality to wherever the method is called in the application&lt;br /&gt;
&lt;br /&gt;
Altered functionality of the method call in def generate_keys (user.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
Altered functionality of the method call in grant_with_private_key (publishing_controller.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
Built spec test for modified assign_copyright method in assignment_participant_spec.rb&lt;br /&gt;
Creates new RSA key-pair for a participant&lt;br /&gt;
Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
'''Refactor review_score method'''&lt;br /&gt;
The review_score method returns the review score for a particular questionnaire. The issue originally stated that the method should be able to determine the review score for any round of review. The original method returned the first round (index position 0) review score. &lt;br /&gt;
&lt;br /&gt;
We made the following determinations:&lt;br /&gt;
The review_score method only returns the first round review score which is from index position 0:&lt;br /&gt;
&lt;br /&gt;
We determined that review_score method is only being called in collusion_cycle.rb, which is no longer used in the Expertiza&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
There were no existing test cases for the GradesController. We have added a new spec file 'grades_spec.rb' which covers testing scenario for the newly added method. The specs were run on the previous and current files and they return the same results implying that the refactored code does not break anything.&lt;br /&gt;
As the model was not changed, no test cases were added for the model.&lt;br /&gt;
&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
Removed #assign_quiz spec test from assignment_participant_spec.rb to correlate with the deletion of the assign_quiz method itself. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
Refactored all instances of copy_participant, including spec test in assignment_participant_spec.rb. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
Following refactor, a new spec test needed to be built for the modified assign_copyright method in assignment_participant_spec.rb.&lt;br /&gt;
Creates new RSA key-pair for a participant&lt;br /&gt;
Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Following steps needs to be performed to test the volume refactoring in the UI:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Login as instructor and enter anonymized view using the manage tag.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Go to the manage tab and enter the courses page&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose a course and in any of the listed assignments, under the action section, click “view reports”&amp;lt;br/&amp;gt;&lt;br /&gt;
4. Select the view button&amp;lt;br/&amp;gt;&lt;br /&gt;
5. You should see the volume of reviews by round for each reviewer.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135186</id>
		<title>CSC/ECE 517 Fall 2020/oss E2072 RLM</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135186"/>
		<updated>2020-10-14T13:26:51Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Solutions Implemented and Delivered */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2072 OSS assignment for Fall 2020, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
&lt;br /&gt;
For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:&lt;br /&gt;
* Instructor login: username -&amp;gt; instructor6,  password -&amp;gt; password&lt;br /&gt;
* Student  login: username -&amp;gt; student4340,  password -&amp;gt; password &lt;br /&gt;
* Student login: username -&amp;gt; student4405,  password -&amp;gt; password&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU and supported by MIT and the National Science Foundation. &lt;br /&gt;
&lt;br /&gt;
It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentParticipant model and Review Mapping helper. It focuses on refactoring unkept, unused and misleading methods within the aforementioned files. The project’s goal is to enhance some of the methods in use and clean up others that were either outdated or in need of improvement.&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
Our project focused primarily on refactoring the assignment_partipant.rb Model file. The files modified for this project are:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. assignment_participant.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
3. assignment_participant_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
4. publishing_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
5. user.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
6. quiz_assignment.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Participant Model ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps students and instructors view grades and reviews, update scores, check for grading conflicts and calculate penalties. A couple of long and complex methods were refactored from this controller along with removal of some non-functional code and a few language changes to make it Ruby style.&lt;br /&gt;
Three methods in particular, namely conflict_notification ,calculate_all_penalties and edit were found to be too long and were in need of refactoring into smaller, easier to manage methods. Few more  compact methods were created for this purpose.&lt;br /&gt;
&lt;br /&gt;
There were no existing test cases for the controller. We have added a spec file named 'grades_spec.rb' under the spec folder. As no changes were done for the model, no tests for the model were included.&lt;br /&gt;
&lt;br /&gt;
=== ReviewMappingHelper ===&lt;br /&gt;
&lt;br /&gt;
This is a helper class that contained methods to help calculate and display information regarding participant reviews and the volume of each review. One non-functional method was removed from the file and two other methods were updated to support sorting the volume of an arbitrary number of review rounds. &lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Refactor self.grant_publishing_rights to assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
WI2: Determine whether reviews_by_reviewer method is still needed. &amp;lt;br/&amp;gt;&lt;br /&gt;
WI3: Refactor copy method name &amp;lt;br/&amp;gt;&lt;br /&gt;
WI4: Refactor assign_quiz &amp;lt;br/&amp;gt;&lt;br /&gt;
WI5: Refactor Review Score &amp;lt;br/&amp;gt;&lt;br /&gt;
WI6: Rewrite Score calculation within the scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
WI7: Refactor Volume - # Distinct Words in a Review &amp;lt;br/&amp;gt;&lt;br /&gt;
WI8: Provide documentation for Compute_Assignment_Score &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
'''Refactoring Review Volume'''&lt;br /&gt;
&lt;br /&gt;
This involved two methods in review_mapping_helper.rb, sort_reviewer_by_review_volume_desc and initialize_chart_elements, which worked together to sort the reviews by the average volume of reviews in each round of an assignment and then move the data of reviews in each round from a current round to prepare to display the information in chart form. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. The methods were originally implemented in a way that only allowed for the information from three rounds of an assignment to be gathered. The functions had to be re-implemented using a loop that could gather and initialize the data from any given number of rounds. &lt;br /&gt;
&lt;br /&gt;
2. The display_volume_metric was no longer being used within the rest of the project and so was removed to clean up the file. &lt;br /&gt;
&lt;br /&gt;
'''sort_review_by_review_volume_desc loop re-implementation:''' &lt;br /&gt;
&lt;br /&gt;
[[File:expertiza_change_1.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
'''Initialize_chart_elements loop re-implementation:'''&lt;br /&gt;
 &lt;br /&gt;
[[File:517_screenshot3.png|1080px|]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Rewrite Scores Method'''&lt;br /&gt;
The scores method returns the scores that a specific assignment_participant has received Originally, the scores method contained several convoluted method calls with some unused and commented out code. Our team was tasked with rewriting the scores method in assignment_participant.rb to make it more readable and transparent. &lt;br /&gt;
&lt;br /&gt;
The following changes were made to accomplish this task:&lt;br /&gt;
Removed topic_total_scores (score calculations for a microtask) and moved it into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &lt;br /&gt;
&lt;br /&gt;
Removed calculate_scores method and refactored the code into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Refactored the merge_scores method which is called by Scores.&lt;br /&gt;
DRYed out the code by adding a new update_min_or_max method that dynamically sets the min or max&lt;br /&gt;
&lt;br /&gt;
Refactored merge_scores to use update_min_or_max method.&lt;br /&gt;
&lt;br /&gt;
Added 6 RSPEC tests for this new update_min_or_max method&lt;br /&gt;
 &lt;br /&gt;
Added comments for the scores method and merge_scores method&lt;br /&gt;
&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
The assign_quiz method was originally located in the assignment_participant.rb file and was requested to be moved into quiz_questionnaire.rb. However, upon further investigation, it was discovered that there existed two assign_quiz_dynamically methods, one which called the aforementioned assign_quiz method. Our investigation concluded that a newly constructed assign_quiz_dynamically method, located in review_mapping_controller.rb, had become the primary method of performing the tasks associated with assign_quiz and assign_quiz dynamically. Hence, following the consultation of our mentor, we elected to remove the definition and all instances of assign_quiz (assignment_participant.rb) and assign_quiz_dynamically (quiz_assignment.rb).&lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
Removed all instances of assign_quiz method (defined in assignment_participant.rb)&lt;br /&gt;
&lt;br /&gt;
Removed all unused instances assign_quiz_dynamically (defined in quiz_assignment.rb)&lt;br /&gt;
Alternative assign_quiz_dynamically method located in review_mapping_controller.rb became the integral method used in recent years&lt;br /&gt;
&lt;br /&gt;
Ensured all instances of assign_quiz_dynamically (review_mapping_controller.rb) were untouched and operational as expected&lt;br /&gt;
This version does not invoke any assign_quiz method&lt;br /&gt;
Removed #assign_quiz spec test from assignment_participant_spec.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Investigate reviews_by_reviewer Method'''&lt;br /&gt;
The reviews_by_reviewer method returns the reviews of a certain assignment_participant. However, for the past 5 years or so all reviews have been of assignment_teams, not assignment_participant. Our team was tasked with investigating the reviews_by_reviewer method in assignment_participant.rb to determine whether it is still used, or would be useful to continue maintaining. &lt;br /&gt;
&lt;br /&gt;
The following determinations were made:&lt;br /&gt;
Determined that all reviews are of assignment_teams and not of assignment_participant&lt;br /&gt;
The only calls to reviews_by_reviewer method happen in CollusionCycle. &lt;br /&gt;
After verifying with Yang and Dr. Gehringer, we determined that Collusion Cycle is no longer used in the application. CollusionCycle was originally a piece of code that helped detect whether bias existed when teammates gave reviews of other teammates' work. &lt;br /&gt;
Because CollusionCycle is unused, we deemed it appropriate to make the following changes:&lt;br /&gt;
Removed the method definition from assignment_participant.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Removed the rspec test for this method&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
The copy method was determined to have a misleading name for a method that copies a participant to a course. As a result, the copy method name was refactored into 'copy_participant'. &lt;br /&gt;
&lt;br /&gt;
The resulting changes were made to correspond to the name change: &lt;br /&gt;
&lt;br /&gt;
1. Refactored copy method in assignment_participant.rb into 'copy_participant'&lt;br /&gt;
&lt;br /&gt;
2. Refactored all instances of copy_participant associated with a assignment_participant&lt;br /&gt;
* Spec test in assignment_participant_spec.rb was only instance found &lt;br /&gt;
&lt;br /&gt;
[[File:copy_spec.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
Aside from simply refactoring the name of self.grant_publishing_rights into assign_copyright, upon further investigation, we noted that the definition of the method in assignment_participant.rb, did not require the participant parameter and participant loop, but was simplified by moving this functionality to wherever the method is called in the application. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
Refactored self.grant_publishing_rights into 'assign_copyright'&lt;br /&gt;
Refactored definition of the method in assignment_participant.rb, removing the participant parameter and participant loop; moving this functionality to wherever the method is called in the application&lt;br /&gt;
&lt;br /&gt;
Altered functionality of the method call in def generate_keys (user.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
Altered functionality of the method call in grant_with_private_key (publishing_controller.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
Built spec test for modified assign_copyright method in assignment_participant_spec.rb&lt;br /&gt;
Creates new RSA key-pair for a participant&lt;br /&gt;
Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
'''Refactor review_score method'''&lt;br /&gt;
The review_score method returns the review score for a particular questionnaire. The issue originally stated that the method should be able to determine the review score for any round of review. The original method returned the first round (index position 0) review score. &lt;br /&gt;
&lt;br /&gt;
We made the following determinations:&lt;br /&gt;
The review_score method only returns the first round review score which is from index position 0:&lt;br /&gt;
&lt;br /&gt;
We determined that review_score method is only being called in collusion_cycle.rb, which is no longer used in the Expertiza&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
There were no existing test cases for the GradesController. We have added a new spec file 'grades_spec.rb' which covers testing scenario for the newly added method. The specs were run on the previous and current files and they return the same results implying that the refactored code does not break anything.&lt;br /&gt;
As the model was not changed, no test cases were added for the model.&lt;br /&gt;
&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
Removed #assign_quiz spec test from assignment_participant_spec.rb to correlate with the deletion of the assign_quiz method itself. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
Refactored all instances of copy_participant, including spec test in assignment_participant_spec.rb. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
Following refactor, a new spec test needed to be built for the modified assign_copyright method in assignment_participant_spec.rb.&lt;br /&gt;
Creates new RSA key-pair for a participant&lt;br /&gt;
Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Following steps needs to be performed to test the volume refactoring in the UI:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Login as instructor and enter anonymized view using the manage tag.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Go to the manage tab and enter the courses page&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose a course and in any of the listed assignments, under the action section, click “view reports”&amp;lt;br/&amp;gt;&lt;br /&gt;
4. Select the view button&amp;lt;br/&amp;gt;&lt;br /&gt;
5. You should see the volume of reviews by round for each reviewer.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:517_screenshot5.png&amp;diff=135184</id>
		<title>File:517 screenshot5.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:517_screenshot5.png&amp;diff=135184"/>
		<updated>2020-10-14T13:25:34Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:517_screenshot4.png&amp;diff=135182</id>
		<title>File:517 screenshot4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:517_screenshot4.png&amp;diff=135182"/>
		<updated>2020-10-14T13:25:21Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:517_screenshot3.png&amp;diff=135181</id>
		<title>File:517 screenshot3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:517_screenshot3.png&amp;diff=135181"/>
		<updated>2020-10-14T13:24:49Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135179</id>
		<title>CSC/ECE 517 Fall 2020/oss E2072 RLM</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135179"/>
		<updated>2020-10-14T13:16:04Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: /* Solutions Implemented and Delivered */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2072 OSS assignment for Fall 2020, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
&lt;br /&gt;
For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:&lt;br /&gt;
* Instructor login: username -&amp;gt; instructor6,  password -&amp;gt; password&lt;br /&gt;
* Student  login: username -&amp;gt; student4340,  password -&amp;gt; password &lt;br /&gt;
* Student login: username -&amp;gt; student4405,  password -&amp;gt; password&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU and supported by MIT and the National Science Foundation. &lt;br /&gt;
&lt;br /&gt;
It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentParticipant model and Review Mapping helper. It focuses on refactoring unkept, unused and misleading methods within the aforementioned files. The project’s goal is to enhance some of the methods in use and clean up others that were either outdated or in need of improvement.&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
Our project focused primarily on refactoring the assignment_partipant.rb Model file. The files modified for this project are:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. assignment_participant.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
3. assignment_participant_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
4. publishing_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
5. user.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
6. quiz_assignment.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Participant Model ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps students and instructors view grades and reviews, update scores, check for grading conflicts and calculate penalties. A couple of long and complex methods were refactored from this controller along with removal of some non-functional code and a few language changes to make it Ruby style.&lt;br /&gt;
Three methods in particular, namely conflict_notification ,calculate_all_penalties and edit were found to be too long and were in need of refactoring into smaller, easier to manage methods. Few more  compact methods were created for this purpose.&lt;br /&gt;
&lt;br /&gt;
There were no existing test cases for the controller. We have added a spec file named 'grades_spec.rb' under the spec folder. As no changes were done for the model, no tests for the model were included.&lt;br /&gt;
&lt;br /&gt;
=== ReviewMappingHelper ===&lt;br /&gt;
&lt;br /&gt;
This is a helper class that contained methods to help calculate and display information regarding participant reviews and the volume of each review. One non-functional method was removed from the file and two other methods were updated to support sorting the volume of an arbitrary number of review rounds. &lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Refactor self.grant_publishing_rights to assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
WI2: Determine whether reviews_by_reviewer method is still needed. &amp;lt;br/&amp;gt;&lt;br /&gt;
WI3: Refactor copy method name &amp;lt;br/&amp;gt;&lt;br /&gt;
WI4: Refactor assign_quiz &amp;lt;br/&amp;gt;&lt;br /&gt;
WI5: Refactor Review Score &amp;lt;br/&amp;gt;&lt;br /&gt;
WI6: Rewrite Score calculation within the scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
WI7: Refactor Volume - # Distinct Words in a Review &amp;lt;br/&amp;gt;&lt;br /&gt;
WI8: Provide documentation for Compute_Assignment_Score &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
'''Refactoring Review Volume'''&lt;br /&gt;
&lt;br /&gt;
This involved two methods in review_mapping_helper.rb, sort_reviewer_by_review_volume_desc and initialize_chart_elements, which worked together to sort the reviews by the average volume of reviews in each round of an assignment and then move the data of reviews in each round from a current round to prepare to display the information in chart form. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. The methods were originally implemented in a way that only allowed for the information from three rounds of an assignment to be gathered. The functions had to be re-implemented using a loop that could gather and initialize the data from any given number of rounds. &lt;br /&gt;
&lt;br /&gt;
2. The display_volume_metric was no longer being used within the rest of the project and so was removed to clean up the file. &lt;br /&gt;
&lt;br /&gt;
sort_review_by_review_volume_desc loop re-implementation: &lt;br /&gt;
&lt;br /&gt;
[[File:expertiza_change_1.png|1080px|]]&lt;br /&gt;
&lt;br /&gt;
Initialize_chart_elements loop re-implementation: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Rewrite Scores Method'''&lt;br /&gt;
The scores method returns the scores that a specific assignment_participant has received Originally, the scores method contained several convoluted method calls with some unused and commented out code. Our team was tasked with rewriting the scores method in assignment_participant.rb to make it more readable and transparent. &lt;br /&gt;
&lt;br /&gt;
The following changes were made to accomplish this task:&lt;br /&gt;
Removed topic_total_scores (score calculations for a microtask) and moved it into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &lt;br /&gt;
&lt;br /&gt;
Removed calculate_scores method and refactored the code into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Refactored the merge_scores method which is called by Scores.&lt;br /&gt;
DRYed out the code by adding a new update_min_or_max method that dynamically sets the min or max&lt;br /&gt;
&lt;br /&gt;
Refactored merge_scores to use update_min_or_max method.&lt;br /&gt;
&lt;br /&gt;
Added 6 RSPEC tests for this new update_min_or_max method&lt;br /&gt;
 &lt;br /&gt;
Added comments for the scores method and merge_scores method&lt;br /&gt;
&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
The assign_quiz method was originally located in the assignment_participant.rb file and was requested to be moved into quiz_questionnaire.rb. However, upon further investigation, it was discovered that there existed two assign_quiz_dynamically methods, one which called the aforementioned assign_quiz method. Our investigation concluded that a newly constructed assign_quiz_dynamically method, located in review_mapping_controller.rb, had become the primary method of performing the tasks associated with assign_quiz and assign_quiz dynamically. Hence, following the consultation of our mentor, we elected to remove the definition and all instances of assign_quiz (assignment_participant.rb) and assign_quiz_dynamically (quiz_assignment.rb).&lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
Removed all instances of assign_quiz method (defined in assignment_participant.rb)&lt;br /&gt;
&lt;br /&gt;
Removed all unused instances assign_quiz_dynamically (defined in quiz_assignment.rb)&lt;br /&gt;
Alternative assign_quiz_dynamically method located in review_mapping_controller.rb became the integral method used in recent years&lt;br /&gt;
&lt;br /&gt;
Ensured all instances of assign_quiz_dynamically (review_mapping_controller.rb) were untouched and operational as expected&lt;br /&gt;
This version does not invoke any assign_quiz method&lt;br /&gt;
Removed #assign_quiz spec test from assignment_participant_spec.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Investigate reviews_by_reviewer Method'''&lt;br /&gt;
The reviews_by_reviewer method returns the reviews of a certain assignment_participant. However, for the past 5 years or so all reviews have been of assignment_teams, not assignment_participant. Our team was tasked with investigating the reviews_by_reviewer method in assignment_participant.rb to determine whether it is still used, or would be useful to continue maintaining. &lt;br /&gt;
&lt;br /&gt;
The following determinations were made:&lt;br /&gt;
Determined that all reviews are of assignment_teams and not of assignment_participant&lt;br /&gt;
The only calls to reviews_by_reviewer method happen in CollusionCycle. &lt;br /&gt;
After verifying with Yang and Dr. Gehringer, we determined that Collusion Cycle is no longer used in the application. CollusionCycle was originally a piece of code that helped detect whether bias existed when teammates gave reviews of other teammates' work. &lt;br /&gt;
Because CollusionCycle is unused, we deemed it appropriate to make the following changes:&lt;br /&gt;
Removed the method definition from assignment_participant.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Removed the rspec test for this method&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
The copy method was determined to have a misleading name for a method that copies a participant to a course. As a result, the copy method name was refactored into 'copy_participant'. &lt;br /&gt;
&lt;br /&gt;
The resulting changes were made to correspond to the name change: &lt;br /&gt;
&lt;br /&gt;
Refactored copy method in assignment_participant.rb into 'copy_participant'&lt;br /&gt;
&lt;br /&gt;
Refactored all instances of copy_participant associated with a assignment_participant&lt;br /&gt;
Including spec test&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
Aside from simply refactoring the name of self.grant_publishing_rights into assign_copyright, upon further investigation, we noted that the definition of the method in assignment_participant.rb, did not require the participant parameter and participant loop, but was simplified by moving this functionality to wherever the method is called in the application. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
Refactored self.grant_publishing_rights into 'assign_copyright'&lt;br /&gt;
Refactored definition of the method in assignment_participant.rb, removing the participant parameter and participant loop; moving this functionality to wherever the method is called in the application&lt;br /&gt;
&lt;br /&gt;
Altered functionality of the method call in def generate_keys (user.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
Altered functionality of the method call in grant_with_private_key (publishing_controller.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
Built spec test for modified assign_copyright method in assignment_participant_spec.rb&lt;br /&gt;
Creates new RSA key-pair for a participant&lt;br /&gt;
Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
'''Refactor review_score method'''&lt;br /&gt;
The review_score method returns the review score for a particular questionnaire. The issue originally stated that the method should be able to determine the review score for any round of review. The original method returned the first round (index position 0) review score. &lt;br /&gt;
&lt;br /&gt;
We made the following determinations:&lt;br /&gt;
The review_score method only returns the first round review score which is from index position 0:&lt;br /&gt;
&lt;br /&gt;
We determined that review_score method is only being called in collusion_cycle.rb, which is no longer used in the Expertiza&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
There were no existing test cases for the GradesController. We have added a new spec file 'grades_spec.rb' which covers testing scenario for the newly added method. The specs were run on the previous and current files and they return the same results implying that the refactored code does not break anything.&lt;br /&gt;
As the model was not changed, no test cases were added for the model.&lt;br /&gt;
&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
Removed #assign_quiz spec test from assignment_participant_spec.rb to correlate with the deletion of the assign_quiz method itself. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
Refactored all instances of copy_participant, including spec test in assignment_participant_spec.rb. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
Following refactor, a new spec test needed to be built for the modified assign_copyright method in assignment_participant_spec.rb.&lt;br /&gt;
Creates new RSA key-pair for a participant&lt;br /&gt;
Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Following steps needs to be performed to test the volume refactoring in the UI:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Login as instructor and enter anonymized view using the manage tag.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Go to the manage tab and enter the courses page&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose a course and in any of the listed assignments, under the action section, click “view reports”&amp;lt;br/&amp;gt;&lt;br /&gt;
4. Select the view button&amp;lt;br/&amp;gt;&lt;br /&gt;
5. You should see the volume of reviews by round for each reviewer.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135092</id>
		<title>CSC/ECE 517 Fall 2020/oss E2072 RLM</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020/oss_E2072_RLM&amp;diff=135092"/>
		<updated>2020-10-14T02:07:14Z</updated>

		<summary type="html">&lt;p&gt;Mbgaffor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2072 OSS assignment for Fall 2020, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
&lt;br /&gt;
For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:&lt;br /&gt;
* Instructor login: username -&amp;gt; instructor6,  password -&amp;gt; password&lt;br /&gt;
* Student  login: username -&amp;gt; student4340,  password -&amp;gt; password &lt;br /&gt;
* Student login: username -&amp;gt; student4405,  password -&amp;gt; password&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU and supported by MIT and the National Science Foundation. &lt;br /&gt;
&lt;br /&gt;
It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Description of the current project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the AssignmentParticipant model and Review Mapping helper. It focuses on refactoring unkept, unused and misleading methods within the aforementioned files. The project’s goal is to enhance some of the methods in use and clean up others that were either outdated or in need of improvement.&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
Our project focused primarily on refactoring the assignment_partipant.rb Model file. The files modified for this project are:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. assignment_participant.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
3. assignment_participant_spec.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
4. publishing_controller.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
5. user.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
6. quiz_assignment.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Participant Model ===&lt;br /&gt;
 &lt;br /&gt;
This is a controller that helps students and instructors view grades and reviews, update scores, check for grading conflicts and calculate penalties. A couple of long and complex methods were refactored from this controller along with removal of some non-functional code and a few language changes to make it Ruby style.&lt;br /&gt;
Three methods in particular, namely conflict_notification ,calculate_all_penalties and edit were found to be too long and were in need of refactoring into smaller, easier to manage methods. Few more  compact methods were created for this purpose.&lt;br /&gt;
&lt;br /&gt;
There were no existing test cases for the controller. We have added a spec file named 'grades_spec.rb' under the spec folder. As no changes were done for the model, no tests for the model were included.&lt;br /&gt;
&lt;br /&gt;
=== ReviewMappingHelper ===&lt;br /&gt;
&lt;br /&gt;
This is a helper class that contained methods to help calculate and display information regarding participant reviews and the volume of each review. One non-functional method was removed from the file and two other methods were updated to support sorting the volume of an arbitrary number of review rounds. &lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1: Refactor self.grant_publishing_rights to assign_copyright &amp;lt;br/&amp;gt;&lt;br /&gt;
WI2: Determine whether reviews_by_reviewer method is still needed. &amp;lt;br/&amp;gt;&lt;br /&gt;
WI3: Refactor copy method name &amp;lt;br/&amp;gt;&lt;br /&gt;
WI4: Refactor assign_quiz &amp;lt;br/&amp;gt;&lt;br /&gt;
WI5: Refactor Review Score &amp;lt;br/&amp;gt;&lt;br /&gt;
WI6: Rewrite Score calculation within the scores method &amp;lt;br/&amp;gt;&lt;br /&gt;
WI7: Refactor Volume - # Distinct Words in a Review &amp;lt;br/&amp;gt;&lt;br /&gt;
WI8: Provide documentation for Compute_Assignment_Score &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
'''Refactoring Review Volume'''&lt;br /&gt;
&lt;br /&gt;
This involved two methods in review_mapping_helper.rb, sort_reviewer_by_review_volume_desc and initialize_chart_elements, which worked together to sort the reviews by the average volume of reviews in each round of an assignment and then move the data of reviews in each round from a current round to prepare to display the information in chart form. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
1. The methods were originally implemented in a way that only allowed for the information from three rounds of an assignment to be gathered. The functions had to be re-implemented using a loop that could gather and initialize the data from any given number of rounds. &lt;br /&gt;
&lt;br /&gt;
2. The display_volume_metric was no longer being used within the rest of the project and so was removed to clean up the file. &lt;br /&gt;
&lt;br /&gt;
sort_review_by_review_volume_desc loop re-implementation: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Initialize_chart_elements loop re-implementation: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Rewrite Scores Method'''&lt;br /&gt;
The scores method returns the scores that a specific assignment_participant has received Originally, the scores method contained several convoluted method calls with some unused and commented out code. Our team was tasked with rewriting the scores method in assignment_participant.rb to make it more readable and transparent. &lt;br /&gt;
&lt;br /&gt;
The following changes were made to accomplish this task:&lt;br /&gt;
Removed topic_total_scores (score calculations for a microtask) and moved it into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &lt;br /&gt;
&lt;br /&gt;
Removed calculate_scores method and refactored the code into the scores method, since this method was only called once and wasn't used anywhere else. I also removed the associated tests. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Refactored the merge_scores method which is called by Scores.&lt;br /&gt;
DRYed out the code by adding a new update_min_or_max method that dynamically sets the min or max&lt;br /&gt;
&lt;br /&gt;
Refactored merge_scores to use update_min_or_max method.&lt;br /&gt;
&lt;br /&gt;
Added 6 RSPEC tests for this new update_min_or_max method&lt;br /&gt;
 &lt;br /&gt;
Added comments for the scores method and merge_scores method&lt;br /&gt;
&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
The assign_quiz method was originally located in the assignment_participant.rb file and was requested to be moved into quiz_questionnaire.rb. However, upon further investigation, it was discovered that there existed two assign_quiz_dynamically methods, one which called the aforementioned assign_quiz method. Our investigation concluded that a newly constructed assign_quiz_dynamically method, located in review_mapping_controller.rb, had become the primary method of performing the tasks associated with assign_quiz and assign_quiz dynamically. Hence, following the consultation of our mentor, we elected to remove the definition and all instances of assign_quiz (assignment_participant.rb) and assign_quiz_dynamically (quiz_assignment.rb).&lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
Removed all instances of assign_quiz method (defined in assignment_participant.rb)&lt;br /&gt;
&lt;br /&gt;
Removed all unused instances assign_quiz_dynamically (defined in quiz_assignment.rb)&lt;br /&gt;
Alternative assign_quiz_dynamically method located in review_mapping_controller.rb became the integral method used in recent years&lt;br /&gt;
&lt;br /&gt;
Ensured all instances of assign_quiz_dynamically (review_mapping_controller.rb) were untouched and operational as expected&lt;br /&gt;
This version does not invoke any assign_quiz method&lt;br /&gt;
Removed #assign_quiz spec test from assignment_participant_spec.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Investigate reviews_by_reviewer Method'''&lt;br /&gt;
The reviews_by_reviewer method returns the reviews of a certain assignment_participant. However, for the past 5 years or so all reviews have been of assignment_teams, not assignment_participant. Our team was tasked with investigating the reviews_by_reviewer method in assignment_participant.rb to determine whether it is still used, or would be useful to continue maintaining. &lt;br /&gt;
&lt;br /&gt;
The following determinations were made:&lt;br /&gt;
Determined that all reviews are of assignment_teams and not of assignment_participant&lt;br /&gt;
The only calls to reviews_by_reviewer method happen in CollusionCycle. &lt;br /&gt;
After verifying with Yang and Dr. Gehringer, we determined that Collusion Cycle is no longer used in the application. CollusionCycle was originally a piece of code that helped detect whether bias existed when teammates gave reviews of other teammates' work. &lt;br /&gt;
Because CollusionCycle is unused, we deemed it appropriate to make the following changes:&lt;br /&gt;
Removed the method definition from assignment_participant.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Removed the rspec test for this method&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
The copy method was determined to have a misleading name for a method that copies a participant to a course. As a result, the copy method name was refactored into 'copy_participant'. &lt;br /&gt;
&lt;br /&gt;
The resulting changes were made to correspond to the name change: &lt;br /&gt;
&lt;br /&gt;
Refactored copy method in assignment_participant.rb into 'copy_participant'&lt;br /&gt;
&lt;br /&gt;
Refactored all instances of copy_participant associated with a assignment_participant&lt;br /&gt;
Including spec test&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
Aside from simply refactoring the name of self.grant_publishing_rights into assign_copyright, upon further investigation, we noted that the definition of the method in assignment_participant.rb, did not require the participant parameter and participant loop, but was simplified by moving this functionality to wherever the method is called in the application. &lt;br /&gt;
&lt;br /&gt;
The following changes were made: &lt;br /&gt;
&lt;br /&gt;
Refactored self.grant_publishing_rights into 'assign_copyright'&lt;br /&gt;
Refactored definition of the method in assignment_participant.rb, removing the participant parameter and participant loop; moving this functionality to wherever the method is called in the application&lt;br /&gt;
&lt;br /&gt;
Altered functionality of the method call in def generate_keys (user.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
Altered functionality of the method call in grant_with_private_key (publishing_controller.rb) to handle the 'participants.each do' loop&lt;br /&gt;
&lt;br /&gt;
Built spec test for modified assign_copyright method in assignment_participant_spec.rb&lt;br /&gt;
Creates new RSA key-pair for a participant&lt;br /&gt;
Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
'''Refactor review_score method'''&lt;br /&gt;
The review_score method returns the review score for a particular questionnaire. The issue originally stated that the method should be able to determine the review score for any round of review. The original method returned the first round (index position 0) review score. &lt;br /&gt;
&lt;br /&gt;
We made the following determinations:&lt;br /&gt;
The review_score method only returns the first round review score which is from index position 0:&lt;br /&gt;
&lt;br /&gt;
We determined that review_score method is only being called in collusion_cycle.rb, which is no longer used in the Expertiza&lt;br /&gt;
&lt;br /&gt;
== Testing Details==&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
There were no existing test cases for the GradesController. We have added a new spec file 'grades_spec.rb' which covers testing scenario for the newly added method. The specs were run on the previous and current files and they return the same results implying that the refactored code does not break anything.&lt;br /&gt;
As the model was not changed, no test cases were added for the model.&lt;br /&gt;
&lt;br /&gt;
'''Refactor assign_quiz Method'''&lt;br /&gt;
Removed #assign_quiz spec test from assignment_participant_spec.rb to correlate with the deletion of the assign_quiz method itself. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor copy Method Name'''&lt;br /&gt;
Refactored all instances of copy_participant, including spec test in assignment_participant_spec.rb. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Refactor self.grant_publishing_rights to assign_copyright'''&lt;br /&gt;
Following refactor, a new spec test needed to be built for the modified assign_copyright method in assignment_participant_spec.rb.&lt;br /&gt;
Creates new RSA key-pair for a participant&lt;br /&gt;
Tests if key matches using assign_copyright&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Following steps needs to be performed to test the volume refactoring in the UI:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Login as instructor and enter anonymized view using the manage tag.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Go to the manage tab and enter the courses page&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Choose a course and in any of the listed assignments, under the action section, click “view reports”&amp;lt;br/&amp;gt;&lt;br /&gt;
4. Select the view button&amp;lt;br/&amp;gt;&lt;br /&gt;
5. You should see the volume of reviews by round for each reviewer.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;/div&gt;</summary>
		<author><name>Mbgaffor</name></author>
	</entry>
</feed>