<?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=Jwbumga2</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=Jwbumga2"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Jwbumga2"/>
	<updated>2026-09-11T18:15:25Z</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=137711</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=137711"/>
		<updated>2020-11-20T17:28:02Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: /* Automated Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
E2084 is concerned primarily with the different reports (review report, author feedback report, and teammate review report) 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;
https://youtu.be/uN2lifOT2CY  &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;
* /views/reports/_teammate_review_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]] &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
'''4. Row Background Color:'''&lt;br /&gt;
* The code implementation was setting the background colors of each row to be different colors depending on whether it was an even or odd row. This should give the table a nice, striped look when displaying data. However, after we included the dynamic JQuery sorting, this messed up the background color as the background color is set initailly when the data is loaded. &amp;lt;br/&amp;gt;&lt;br /&gt;
Thus, in author feedback report and teammate review report, we removed the background color code, and included the '''Zebra''' Jquery widget which dynamically stripes the rows even when sorting. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Previous Implementation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:WCAE_2019_Old.png|720px|]] &amp;lt;br/&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
Fixed Implementation: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:WCAE_2019_Fixed.png|720px|]] &amp;lt;br/&amp;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;
* /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. These tests are necessary as we modified some model logic, and there was lackluster coverage for this function anyway. We test very basic functionality, and ensures it behaves at the unit level as we expect; that is; return true when the assignment uses a rubric for more than one round. &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>Jwbumga2</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=137154</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=137154"/>
		<updated>2020-11-17T02:42:17Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: /* 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 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;
Additional files changed from bugs we discovered&lt;br /&gt;
&lt;br /&gt;
*app/model/assignment.rb&lt;br /&gt;
*spec/model/assignment_spec.rb&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;
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;&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>Jwbumga2</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=137150</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=137150"/>
		<updated>2020-11-17T02:15:41Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: /* 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;
* 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;&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>Jwbumga2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Fixed_view.png&amp;diff=137149</id>
		<title>File:Fixed view.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Fixed_view.png&amp;diff=137149"/>
		<updated>2020-11-17T02:15:09Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jwbumga2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Fixedmodel.png&amp;diff=137107</id>
		<title>File:Fixedmodel.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Fixedmodel.png&amp;diff=137107"/>
		<updated>2020-11-17T01:08:10Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jwbumga2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:-%3Dbug.png&amp;diff=137106</id>
		<title>File:-=bug.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:-%3Dbug.png&amp;diff=137106"/>
		<updated>2020-11-17T01:04:53Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jwbumga2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:To_i_previous.png&amp;diff=137103</id>
		<title>File:To i previous.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:To_i_previous.png&amp;diff=137103"/>
		<updated>2020-11-17T01:01:47Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jwbumga2</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=137090</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=137090"/>
		<updated>2020-11-17T00:16:12Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: /* 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;
*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>Jwbumga2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Fixed_author_feedback.png&amp;diff=137089</id>
		<title>File:Fixed author feedback.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Fixed_author_feedback.png&amp;diff=137089"/>
		<updated>2020-11-17T00:15:04Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jwbumga2</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=137088</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=137088"/>
		<updated>2020-11-16T23:51:57Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: &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;
[[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>Jwbumga2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Fixed_implementation1.png&amp;diff=137043</id>
		<title>File:Fixed implementation1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Fixed_implementation1.png&amp;diff=137043"/>
		<updated>2020-11-16T22:52:06Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jwbumga2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=135727</id>
		<title>CSC/ECE 517 Fall 2020 - E2055 write unit tests for student task.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=135727"/>
		<updated>2020-10-20T03:30:29Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of the Expertiza based OSS project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza] is an open source project based on [https://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
This project in particular intends that the students collaborate with each other and work on making enhancements to the code base by applying the concepts of Rails,RSpec, DRY code,Test driven development etc. This provides an opportunity for students to contribute to an open source project and learn further about software deployment etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About RSpec ==&lt;br /&gt;
&lt;br /&gt;
RSpec is a unit test framework for the Ruby programming language. RSpec is different than traditional xUnit frameworks like JUnit because RSpec is a Behavior driven development tool. What this means is that, tests written in RSpec focus on the &amp;quot;behavior&amp;quot; of an application being tested. RSpec does not put emphasis on, how the application works but instead on how it behaves, in other words, what the application actually does.Each RSpec file contains one or more tests. Each test ensures if a particular feature of our website is working properly.The output of an RSpec run will tell you exactly what features aren't working. The benefit is that tested code is unlikely to break unnoticed.The tests are run every time someone makes, or updates, a [https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests Pull Request].&lt;br /&gt;
&lt;br /&gt;
== DB Schema ==&lt;br /&gt;
Below are the tables that are related ti student task functionality&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/images/7/7a/ExpertizaDbSchema.jpg DB Schema]&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 student_task.rb and student_task_spec.rb. It focuses on writing RSpec unit tests for the code affected or added. The goal of this project is to attempt to add sufficient unit tests to this part of the application and increase its path coverage to above 90 percent.&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* Complete the insufficient unit tests for student_task.rb. &lt;br /&gt;
* Increase path coverage from only 31.91% with 30 lines covered to above 90% coverage&lt;br /&gt;
* Cover edge cases.&lt;br /&gt;
* High branch coverage to be achieved.&lt;br /&gt;
&lt;br /&gt;
There are different tasks that a student can perform. &lt;br /&gt;
* They can see all the assignments that they have been assigned to.&lt;br /&gt;
* They can see details of each assignment like marks, their team, send invitation to student to join a team&lt;br /&gt;
* Review other students' work&lt;br /&gt;
&lt;br /&gt;
== Tests Plan ==&lt;br /&gt;
*Mock Objects to test&lt;br /&gt;
*Topic name&lt;br /&gt;
*Complete?&lt;br /&gt;
*Incomplete?&lt;br /&gt;
*Not started?&lt;br /&gt;
*Revision?&lt;br /&gt;
*Met reviews given&lt;br /&gt;
*Teamed student&lt;br /&gt;
*Get due date&lt;br /&gt;
*Get peer review data&lt;br /&gt;
*Get author feedback&lt;br /&gt;
*Get submission data&lt;br /&gt;
*Get timeline data&lt;br /&gt;
&lt;br /&gt;
== Implementation == &lt;br /&gt;
describe StudentTask do&lt;br /&gt;
  # Write your mocked object here!&lt;br /&gt;
  let(:participant) { build(:participant, id: 1, user_id: user.id, parent_id: assignment.id) }&lt;br /&gt;
  let(:participant2) { build(:participant, id: 2, user_id: user2.id, parent_id: assignment.id) }&lt;br /&gt;
  let(:participant3) { build(:participant, id: 3, user_id: user3.id, parent_id: assignment2.id) }&lt;br /&gt;
  let(:user) { create(:student) }&lt;br /&gt;
  let(:user2) { create(:student, name: &amp;quot;qwertyui&amp;quot;, id: 5) }&lt;br /&gt;
  let(:user3) { create(:student, name: &amp;quot;qwertyui1234&amp;quot;, id: 6) }&lt;br /&gt;
  let(:course) { build(:course) }&lt;br /&gt;
  let(:assignment) { build(:assignment, name: 'assignment 1') }&lt;br /&gt;
  let(:assignment2) { create(:assignment, name: 'assignment 2', is_calibrated: true) }&lt;br /&gt;
  let(:team) { create(:assignment_team, id: 1, name: 'team 1', parent_id: assignment.id, users: [user, user2]) }&lt;br /&gt;
  let(:team2) { create(:assignment_team, id: 2, name: 'team 2', parent_id: assignment2.id, users: [user3]) }&lt;br /&gt;
  let(:team_user) { create(:team_user, id: 3, team_id: team.id, user_id: user.id) }&lt;br /&gt;
  let(:team_user2) { create(:team_user, id: 4, team_id: team.id, user_id: user2.id) }&lt;br /&gt;
  let(:team2_user3) { create(:team_user, id: 5, team_id: team2.id, user_id: user3.id) }&lt;br /&gt;
  let(:course_team) { create(:course_team, id: 3, name: 'course team 1', parent_id: course.id) }&lt;br /&gt;
  let(:cource_team_user) { create(:team_user, id: 6, team_id: course_team.id, user_id: user.id) }&lt;br /&gt;
  let(:cource_team_user2) { create(:team_user, id: 7, team_id: course_team.id, user_id: user2.id) }&lt;br /&gt;
  let(:topic) { build(:topic) }&lt;br /&gt;
  let(:topic2) { create(:topic, topic_name: &amp;quot;TestReview&amp;quot;) }&lt;br /&gt;
  let(:topic3) { create(:topic) }&lt;br /&gt;
  let(:due_date) { build(:assignment_due_date, deadline_type_id: 1) }&lt;br /&gt;
  let(:deadline_type) { build(:deadline_type, id: 1) }&lt;br /&gt;
  let(:review_response_map) { build(:review_response_map, assignment: assignment, reviewer: participant, reviewee: team2) }&lt;br /&gt;
  let(:metareview_response_map) { build(:meta_review_response_map, reviewed_object_id: 1) }&lt;br /&gt;
  let(:response) { build(:response, id: 1, map_id: 1, response_map: review_response_map) }&lt;br /&gt;
  let(:response2) { build(:response, id: 2, map_id: 1, response_map: review_response_map) }&lt;br /&gt;
  let(:submission_record) {build(:submission_record, id:1, team_id: 1, assignment_id: 1) }&lt;br /&gt;
  let(:student_task) do&lt;br /&gt;
    StudentTask.new(&lt;br /&gt;
      user: user,&lt;br /&gt;
      participant: participant,&lt;br /&gt;
      assignment: assignment,&lt;br /&gt;
      topic: topic3,&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
  let(:student_task2) do&lt;br /&gt;
    StudentTask.new(&lt;br /&gt;
      user: user,&lt;br /&gt;
      participant: participant2,&lt;br /&gt;
      assignment: assignment,&lt;br /&gt;
      topic: topic2,&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Tests topic name to ensure it is stored or set as &amp;quot;-&amp;quot;&lt;br /&gt;
  describe &amp;quot;#topic_name&amp;quot; do&lt;br /&gt;
    it 'returns the topic name if given one' do&lt;br /&gt;
      allow(student_task2).to receive(:topic).and_return(topic2)&lt;br /&gt;
      expect(student_task2.topic_name).to eq(&amp;quot;TestReview&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns - for blank name' do&lt;br /&gt;
      expect(student_task.topic_name).to eq(&amp;quot;-&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Verifies completion status of a student task&lt;br /&gt;
  describe &amp;quot;#complete?&amp;quot; do&lt;br /&gt;
    it 'verifies a student task is complete' do&lt;br /&gt;
      allow(student_task).to receive(:stage_deadline).and_return('Complete')&lt;br /&gt;
      expect(student_task.complete?).to be true&lt;br /&gt;
    end&lt;br /&gt;
    it 'verifies a nil stage_deadline to not be complete' do&lt;br /&gt;
      allow(student_task).to receive(:stage_deadline).and_return('')&lt;br /&gt;
      expect(student_task.complete?).to be false&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # tests if hyperlinks or other content is submitted during the submission stage&lt;br /&gt;
  # current stage must be submission&lt;br /&gt;
  # participant has to belong to a team&lt;br /&gt;
  # the team has submitted some content&lt;br /&gt;
  describe &amp;quot;content_submitted_in_current_stage?&amp;quot; do&lt;br /&gt;
    it 'checks if content is submitted during submission stage'do&lt;br /&gt;
       student_task.current_stage = &amp;quot;submission&amp;quot;&lt;br /&gt;
       allow(participant).to receive(:team).and_return([team])&lt;br /&gt;
       allow(participant.team).to receive(:has_submissions?).and_return(true)&lt;br /&gt;
       expect(student_task.content_submitted_in_current_stage?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Tests the updating of the @hyperlinks instance variable based on participant's team&lt;br /&gt;
  # Does not verify operation of ||= call, only tests cases of right hand side&lt;br /&gt;
  describe &amp;quot;#hyperlinks&amp;quot; do&lt;br /&gt;
    it 'returns empty array if participant has no team' do&lt;br /&gt;
      allow(student_task).to receive_message_chain(:participant, :team, :nil?).and_return(true)&lt;br /&gt;
      expect(student_task.hyperlinks).to eq([])&lt;br /&gt;
    end&lt;br /&gt;
    it 'assigns returns populated hyperlinks instance if participant has team' do&lt;br /&gt;
      allow(student_task).to receive_message_chain(:participant, :team, :hyperlinks).and_return(['something'])&lt;br /&gt;
      allow(student_task).to receive_message_chain(:participant, :team, :nil?).and_return(false)&lt;br /&gt;
      expect(student_task.hyperlinks).to eq(['something'])&lt;br /&gt;
    end 	&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Verifies incomplete status of student task&lt;br /&gt;
  describe &amp;quot;#incomplete?&amp;quot; do&lt;br /&gt;
    it 'checks a student_task is incomplete' do&lt;br /&gt;
      expect(student_task.incomplete?).to be true&lt;br /&gt;
    end 	&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Verifies that a task has not started&lt;br /&gt;
  describe &amp;quot;#not_started?&amp;quot; do&lt;br /&gt;
    it 'verfies started status' do&lt;br /&gt;
      allow(student_task).to receive(:in_work_stage?).and_return(true)&lt;br /&gt;
      allow(student_task).to receive(:started?).and_return(true)&lt;br /&gt;
      expect(student_task.not_started?).to eq(false)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'is not started due to work stage' do&lt;br /&gt;
      allow(student_task).to receive(:in_work_stage?).and_return(false)&lt;br /&gt;
      allow(student_task).to receive(:started?).and_return(true)&lt;br /&gt;
      expect(student_task.not_started?).to eq(false)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  # Tests relative_deadline for proper assignment when stage_deadline is present&lt;br /&gt;
  describe &amp;quot;#relative_deadline&amp;quot; do&lt;br /&gt;
    it 'returns false without a valid stage deadline' do&lt;br /&gt;
      allow(student_task).to receive(:stage_deadline).and_return(nil)&lt;br /&gt;
      expect(student_task.relative_deadline).to be_falsey&lt;br /&gt;
    end&lt;br /&gt;
    it 'verifies a valid case where stage_deadline is present' do&lt;br /&gt;
      allow(student_task).to receive(:stage_deadline).and_return(true)&lt;br /&gt;
      allow(student_task).to receive(:time_ago_in_words).and_return(&amp;quot;astring&amp;quot;)&lt;br /&gt;
      expect(student_task.relative_deadline).to eq(&amp;quot;astring&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Examines a task to determine if the task is a revision&lt;br /&gt;
  describe &amp;quot;#revision?&amp;quot; do&lt;br /&gt;
    it 'returns true if content is submitted' do&lt;br /&gt;
      allow(student_task).to receive(:content_submitted_in_current_stage?).and_return(true)&lt;br /&gt;
      allow(student_task).to receive(:reviews_given_in_current_stage?).and_return(false)&lt;br /&gt;
      allow(student_task).to receive(:metareviews_given_in_current_stage?).and_return(false)&lt;br /&gt;
      expect(student_task.revision?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns true if reviews given is true' do&lt;br /&gt;
      allow(student_task).to receive(:content_submitted_in_current_stage?).and_return(false)&lt;br /&gt;
      allow(student_task).to receive(:reviews_given_in_current_stage?).and_return(true)&lt;br /&gt;
      allow(student_task).to receive(:metareviews_given_in_current_stage?).and_return(false)&lt;br /&gt;
      expect(student_task.revision?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns true if metareviews given is true' do&lt;br /&gt;
      allow(student_task).to receive(:content_submitted_in_current_stage?).and_return(false)&lt;br /&gt;
      allow(student_task).to receive(:reviews_given_in_current_stage?).and_return(false)&lt;br /&gt;
      allow(student_task).to receive(:metareviews_given_in_current_stage?).and_return(true)&lt;br /&gt;
      expect(student_task.revision?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  # Checks if metareview was given in current task stage&lt;br /&gt;
  describe &amp;quot;#metreviews_given_in_current_stage?&amp;quot; do&lt;br /&gt;
    it 'return true' do&lt;br /&gt;
      student_task.current_stage = &amp;quot;metareview&amp;quot;&lt;br /&gt;
      allow(student_task).to receive(:metareviews_given?).and_return(true)&lt;br /&gt;
      expect(student_task.metareviews_given_in_current_stage?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  # Checks if review was given in current task stage&lt;br /&gt;
  describe &amp;quot;#reviews_given_in_current_stage?&amp;quot; do&lt;br /&gt;
    it 'return true' do&lt;br /&gt;
      student_task.current_stage = &amp;quot;review&amp;quot;&lt;br /&gt;
      allow(student_task).to receive(:reviews_given?).and_return(true)&lt;br /&gt;
      expect(student_task.reviews_given_in_current_stage?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # tests whether a student task has been started&lt;br /&gt;
  # if the task is not incomplete &amp;amp;&amp;amp; is not in the revision stage&lt;br /&gt;
  # started? returns false&lt;br /&gt;
  # if the task is incomplete &amp;amp;&amp;amp; is in the revision stage&lt;br /&gt;
  # started? returns true&lt;br /&gt;
  describe &amp;quot;#started?&amp;quot; do&lt;br /&gt;
    it 'is not started' do&lt;br /&gt;
      allow(student_task).to receive(:incomplete?).and_return(false)&lt;br /&gt;
      allow(student_task).to receive(:revision?).and_return(false)&lt;br /&gt;
      expect(student_task.started?).to eq(false)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'is started' do&lt;br /&gt;
      allow(student_task).to receive(:incomplete?).and_return(true)&lt;br /&gt;
      allow(student_task).to receive(:revision?).and_return(true)&lt;br /&gt;
      expect(student_task.started?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Tests works stage to ensure state is represented correctly&lt;br /&gt;
  describe &amp;quot;#in_work_stage?&amp;quot; do&lt;br /&gt;
    it &amp;quot;is true, submission is a work stage&amp;quot; do&lt;br /&gt;
      allow(student_task).to receive(:current_stage).and_return(&amp;quot;submission&amp;quot;)&lt;br /&gt;
      expect(student_task.in_work_stage?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
    it &amp;quot;is true, review is a work stage&amp;quot; do&lt;br /&gt;
      allow(student_task).to receive(:current_stage).and_return(&amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(student_task.in_work_stage?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
    it &amp;quot;is true, metareview is a work stage&amp;quot; do&lt;br /&gt;
      allow(student_task).to receive(:current_stage).and_return(&amp;quot;metareview&amp;quot;)&lt;br /&gt;
      expect(student_task.in_work_stage?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
    it &amp;quot;is false, empty object&amp;quot; do&lt;br /&gt;
      allow(student_task).to receive(:current_stage).and_return(&amp;quot;&amp;quot;)&lt;br /&gt;
      expect(student_task.in_work_stage?).to eq(false)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Tests teamed students method which returns the unique students that are paired with the student at some point&lt;br /&gt;
  # within their course&lt;br /&gt;
  describe &amp;quot;#teamed_students&amp;quot; do&lt;br /&gt;
    context 'when not in any team' do&lt;br /&gt;
      it 'returns empty' do&lt;br /&gt;
        expect(StudentTask.teamed_students(user3)).to eq({})&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when assigned in a cource_team ' do&lt;br /&gt;
      it 'returns empty' do&lt;br /&gt;
        allow(user).to receive(:teams).and_return([course_team])&lt;br /&gt;
        expect(StudentTask.teamed_students(user)).to eq({})&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when assigned in a assignment_team ' do&lt;br /&gt;
      it 'returns the students they are teamed with' do&lt;br /&gt;
        allow(user).to receive(:teams).and_return([team])&lt;br /&gt;
        allow(AssignmentParticipant).to receive(:find_by).with(user_id: 1, parent_id: assignment.id).and_return(participant)&lt;br /&gt;
        allow(AssignmentParticipant).to receive(:find_by).with(user_id: 5, parent_id: assignment.id).and_return(participant2)&lt;br /&gt;
        allow(Assignment).to receive(:find_by).with(id: team.parent_id).and_return(assignment)&lt;br /&gt;
        expect(StudentTask.teamed_students(user)).to eq({assignment.course_id =&amp;gt; [user2.fullname]})&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Gets the due dates of an assigment&lt;br /&gt;
  describe &amp;quot;#get_due_date_data&amp;quot; do&lt;br /&gt;
    context 'when called with assignment having empty due dates' do&lt;br /&gt;
      it &amp;quot;return empty time_list array&amp;quot; do&lt;br /&gt;
        timeline_list = []&lt;br /&gt;
        StudentTask.get_due_date_data(assignment, timeline_list)&lt;br /&gt;
        expect(timeline_list).to eq([])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  context 'when called with assignment having due date' do&lt;br /&gt;
    context 'and due_at value nil' do&lt;br /&gt;
      it &amp;quot;return empty time_list array&amp;quot; do&lt;br /&gt;
        allow(due_date).to receive(:deadline_type).and_return(deadline_type)&lt;br /&gt;
        timeline_list = []&lt;br /&gt;
        due_date.due_at=nil;&lt;br /&gt;
        assignment.due_dates = [due_date]&lt;br /&gt;
        StudentTask.get_due_date_data(assignment, timeline_list)&lt;br /&gt;
        expect(timeline_list).to eq([])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'and due_at value not nil' do&lt;br /&gt;
      it &amp;quot;return time_list array&amp;quot; do&lt;br /&gt;
        allow(due_date).to receive(:deadline_type).and_return(deadline_type)&lt;br /&gt;
        timeline_list = []&lt;br /&gt;
        assignment.due_dates = [due_date]&lt;br /&gt;
        StudentTask.get_due_date_data(assignment, timeline_list)&lt;br /&gt;
        expect(timeline_list).to eq([{&lt;br /&gt;
                                          :label=&amp;gt;(due_date.deadline_type.name + ' Deadline').humanize,&lt;br /&gt;
                                          :updated_at=&amp;gt;due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
                                      }])&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Verifies fetching of peer review data of a user and a timeline&lt;br /&gt;
  describe &amp;quot;#get_peer_review_data&amp;quot; do&lt;br /&gt;
    context 'when no review response mapped' do&lt;br /&gt;
      it 'returns empty' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        StudentTask.get_peer_review_data(user2,timeline_list)&lt;br /&gt;
        expect(timeline_list).to eq([])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when mapped to review response map' do&lt;br /&gt;
      it 'returns timeline array' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        allow(ReviewResponseMap).to receive_message_chain(:where, :find_each).with(reviewer_id: 1).with(no_args).and_yield(review_response_map)&lt;br /&gt;
        allow(review_response_map).to receive(:id).and_return(1)&lt;br /&gt;
        allow(Response).to receive_message_chain(:where, :last).with(map_id: 1).with(no_args).and_return(response)&lt;br /&gt;
        allow(response).to receive(:round).and_return(1)&lt;br /&gt;
        allow(response).to receive(:updated_at).and_return(Time.new(2019))&lt;br /&gt;
        timevalue = Time.new(2019).strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
        expect(StudentTask.get_peer_review_data(1,timeline_list)).to eq([{:id=&amp;gt;1, :label=&amp;gt;&amp;quot;Round 1 peer review&amp;quot;, :updated_at=&amp;gt;timevalue}])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  # Verifies retrieval of feedback from author&lt;br /&gt;
  describe &amp;quot;#get_author_feedback_data&amp;quot; do&lt;br /&gt;
    context 'when no feedback response mapped' do&lt;br /&gt;
      it 'returns empty' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        StudentTask.get_author_feedback_data(user2,timeline_list)&lt;br /&gt;
        expect(timeline_list).to eq([])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when mapped to feedback response map' do&lt;br /&gt;
      it 'returns timeline array' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        allow(FeedbackResponseMap).to receive_message_chain(:where, :find_each).with(reviewer_id: 1).with(no_args).and_yield(review_response_map)&lt;br /&gt;
        allow(review_response_map).to receive(:id).and_return(1)&lt;br /&gt;
        allow(Response).to receive_message_chain(:where, :last).with(map_id: 1).with(no_args).and_return(response)&lt;br /&gt;
        allow(response).to receive(:updated_at).and_return(Time.now)&lt;br /&gt;
        timevalue = Time.now.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
        expect(StudentTask.get_author_feedback_data(1,timeline_list)).to eq([{:id=&amp;gt;1, :label=&amp;gt;&amp;quot;Author feedback&amp;quot;, :updated_at=&amp;gt;timevalue}])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Verrifies retrieval of submission data from submission&lt;br /&gt;
  describe '#get_submission_data' do&lt;br /&gt;
    context 'when no submission data mapped' do&lt;br /&gt;
      it 'returns nil' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        expect(StudentTask.get_submission_data(1,1,timeline_list)).to eq(nil)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when submission data mapped and not submit hyperlink or Remove hyperlink' do&lt;br /&gt;
      it 'returns timeline_list' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        allow(SubmissionRecord).to receive_message_chain(:where, :find_each).with(team_id: 1, assignment_id: 1).with(no_args).and_yield(submission_record)&lt;br /&gt;
        allow(submission_record).to receive(:operation).and_return('testing_label')&lt;br /&gt;
        allow(submission_record).to receive(:updated_at).and_return(Time.new(2019))&lt;br /&gt;
        timevalue = Time.new(2019).strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
        expect(StudentTask.get_submission_data(1,1,timeline_list)).to eq([{:label=&amp;gt;&amp;quot;Testing label&amp;quot;, :updated_at=&amp;gt;timevalue}])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when submission data mapped and operation is submit_hyperlink' do&lt;br /&gt;
      it 'returns timeline_list with link' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        allow(SubmissionRecord).to receive_message_chain(:where, :find_each).with(team_id: 1, assignment_id: 1).with(no_args).and_yield(submission_record)&lt;br /&gt;
        allow(submission_record).to receive(:operation).and_return('Submit Hyperlink')&lt;br /&gt;
        allow(submission_record).to receive(:updated_at).and_return(Time.new(2019))&lt;br /&gt;
        timevalue = Time.new(2019).strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
        expect(StudentTask.get_submission_data(1,1,timeline_list)).to eq([{:label=&amp;gt;&amp;quot;Submit hyperlink&amp;quot;, :updated_at=&amp;gt;timevalue, :link=&amp;gt;&amp;quot;www.wolfware.edu&amp;quot;}])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when submission data mapped and operation is Remove Hyperlink' do&lt;br /&gt;
      it 'returns timeline_list with link' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        allow(SubmissionRecord).to receive_message_chain(:where, :find_each).with(team_id: 1, assignment_id: 1).with(no_args).and_yield(submission_record)&lt;br /&gt;
        allow(submission_record).to receive(:operation).and_return('Remove Hyperlink')&lt;br /&gt;
        timevalue = Time.new(2019).strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
        allow(submission_record).to receive(:updated_at).and_return(Time.new(2019))&lt;br /&gt;
        expect(StudentTask.get_submission_data(1,1,timeline_list)).to eq([{:label=&amp;gt;&amp;quot;Remove hyperlink&amp;quot;, :updated_at=&amp;gt;timevalue, :link=&amp;gt;&amp;quot;www.wolfware.edu&amp;quot;}])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  # Verifies retrieval of timeline data&lt;br /&gt;
  describe '#get_timeline_data' do&lt;br /&gt;
    context 'when no timeline data mapped' do&lt;br /&gt;
      it 'returns nil' do&lt;br /&gt;
        expect(StudentTask.get_timeline_data(assignment, participant, team)).to eq([])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Line Coverage achieved ==&lt;br /&gt;
*94 relevant lines&lt;br /&gt;
*86 lines covered&lt;br /&gt;
*8 lines missed&lt;br /&gt;
*Coverage = 91.49%&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
Some of the tests were rather shallow, get_timeline_data specifically needs depth added.&lt;br /&gt;
&lt;br /&gt;
== Video of Tests running ==&lt;br /&gt;
[https://youtu.be/N6H1HtQ4eds]&lt;br /&gt;
&lt;br /&gt;
== Pull Request ==&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/1810]&lt;br /&gt;
&lt;br /&gt;
== Team Members == &lt;br /&gt;
John Bumgardner, Pedro Benitez, Luke McConnaughey&lt;/div&gt;</summary>
		<author><name>Jwbumga2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=135718</id>
		<title>CSC/ECE 517 Fall 2020 - E2055 write unit tests for student task.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=135718"/>
		<updated>2020-10-20T03:23:23Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of the Expertiza based OSS project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza] is an open source project based on [https://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
This project in particular intends that the students collaborate with each other and work on making enhancements to the code base by applying the concepts of Rails,RSpec, DRY code,Test driven development etc. This provides an opportunity for students to contribute to an open source project and learn further about software deployment etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About RSpec ==&lt;br /&gt;
&lt;br /&gt;
RSpec is a unit test framework for the Ruby programming language. RSpec is different than traditional xUnit frameworks like JUnit because RSpec is a Behavior driven development tool. What this means is that, tests written in RSpec focus on the &amp;quot;behavior&amp;quot; of an application being tested. RSpec does not put emphasis on, how the application works but instead on how it behaves, in other words, what the application actually does.Each RSpec file contains one or more tests. Each test ensures if a particular feature of our website is working properly.The output of an RSpec run will tell you exactly what features aren't working. The benefit is that tested code is unlikely to break unnoticed.The tests are run every time someone makes, or updates, a [https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests Pull Request].&lt;br /&gt;
&lt;br /&gt;
== DB Schema ==&lt;br /&gt;
Below are the tables that are related ti student task functionality&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/images/7/7a/ExpertizaDbSchema.jpg DB Schema]&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 student_task.rb and student_task_spec.rb. It focuses on writing RSpec unit tests for the code affected or added. The goal of this project is to attempt to add sufficient unit tests to this part of the application and increase its path coverage to above 90 percent.&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* Complete the insufficient unit tests for student_task.rb. &lt;br /&gt;
* Increase path coverage from only 31.91% with 30 lines covered to above 90% coverage&lt;br /&gt;
* Cover edge cases.&lt;br /&gt;
* High branch coverage to be achieved.&lt;br /&gt;
&lt;br /&gt;
There are different tasks that a student can perform. &lt;br /&gt;
* They can see all the assignments that they have been assigned to.&lt;br /&gt;
* They can see details of each assignment like marks, their team, send invitation to student to join a team&lt;br /&gt;
* Review other students' work&lt;br /&gt;
&lt;br /&gt;
== Tests Plan ==&lt;br /&gt;
*Mock Objects to test&lt;br /&gt;
*Topic name&lt;br /&gt;
*Complete?&lt;br /&gt;
*Incomplete?&lt;br /&gt;
*Not started?&lt;br /&gt;
*Revision?&lt;br /&gt;
*Met reviews given&lt;br /&gt;
*Teamed student&lt;br /&gt;
*Get due date&lt;br /&gt;
*Get peer review data&lt;br /&gt;
*Get author feedback&lt;br /&gt;
*Get submission data&lt;br /&gt;
*Get timeline data&lt;br /&gt;
&lt;br /&gt;
== Implementation == &lt;br /&gt;
describe StudentTask do&lt;br /&gt;
  # Write your mocked object here!&lt;br /&gt;
  let(:participant) { build(:participant, id: 1, user_id: user.id, parent_id: assignment.id) }&lt;br /&gt;
  let(:participant2) { build(:participant, id: 2, user_id: user2.id, parent_id: assignment.id) }&lt;br /&gt;
  let(:participant3) { build(:participant, id: 3, user_id: user3.id, parent_id: assignment2.id) }&lt;br /&gt;
  let(:user) { create(:student) }&lt;br /&gt;
  let(:user2) { create(:student, name: &amp;quot;qwertyui&amp;quot;, id: 5) }&lt;br /&gt;
  let(:user3) { create(:student, name: &amp;quot;qwertyui1234&amp;quot;, id: 6) }&lt;br /&gt;
  let(:course) { build(:course) }&lt;br /&gt;
  let(:assignment) { build(:assignment, name: 'assignment 1') }&lt;br /&gt;
  let(:assignment2) { create(:assignment, name: 'assignment 2', is_calibrated: true) }&lt;br /&gt;
  let(:team) { create(:assignment_team, id: 1, name: 'team 1', parent_id: assignment.id, users: [user, user2]) }&lt;br /&gt;
  let(:team2) { create(:assignment_team, id: 2, name: 'team 2', parent_id: assignment2.id, users: [user3]) }&lt;br /&gt;
  let(:team_user) { create(:team_user, id: 3, team_id: team.id, user_id: user.id) }&lt;br /&gt;
  let(:team_user2) { create(:team_user, id: 4, team_id: team.id, user_id: user2.id) }&lt;br /&gt;
  let(:team2_user3) { create(:team_user, id: 5, team_id: team2.id, user_id: user3.id) }&lt;br /&gt;
  let(:course_team) { create(:course_team, id: 3, name: 'course team 1', parent_id: course.id) }&lt;br /&gt;
  let(:cource_team_user) { create(:team_user, id: 6, team_id: course_team.id, user_id: user.id) }&lt;br /&gt;
  let(:cource_team_user2) { create(:team_user, id: 7, team_id: course_team.id, user_id: user2.id) }&lt;br /&gt;
  let(:topic) { build(:topic) }&lt;br /&gt;
  let(:topic2) { create(:topic, topic_name: &amp;quot;TestReview&amp;quot;) }&lt;br /&gt;
  let(:topic3) { create(:topic) }&lt;br /&gt;
  let(:due_date) { build(:assignment_due_date, deadline_type_id: 1) }&lt;br /&gt;
  let(:deadline_type) { build(:deadline_type, id: 1) }&lt;br /&gt;
  let(:review_response_map) { build(:review_response_map, assignment: assignment, reviewer: participant, reviewee: team2) }&lt;br /&gt;
  let(:metareview_response_map) { build(:meta_review_response_map, reviewed_object_id: 1) }&lt;br /&gt;
  let(:response) { build(:response, id: 1, map_id: 1, response_map: review_response_map) }&lt;br /&gt;
  let(:response2) { build(:response, id: 2, map_id: 1, response_map: review_response_map) }&lt;br /&gt;
  let(:submission_record) {build(:submission_record, id:1, team_id: 1, assignment_id: 1) }&lt;br /&gt;
  let(:student_task) do&lt;br /&gt;
    StudentTask.new(&lt;br /&gt;
      user: user,&lt;br /&gt;
      participant: participant,&lt;br /&gt;
      assignment: assignment,&lt;br /&gt;
      topic: topic3,&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
  let(:student_task2) do&lt;br /&gt;
    StudentTask.new(&lt;br /&gt;
      user: user,&lt;br /&gt;
      participant: participant2,&lt;br /&gt;
      assignment: assignment,&lt;br /&gt;
      topic: topic2,&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Tests topic name to ensure it is stored or set as &amp;quot;-&amp;quot;&lt;br /&gt;
  describe &amp;quot;#topic_name&amp;quot; do&lt;br /&gt;
    it 'returns the topic name if given one' do&lt;br /&gt;
      allow(student_task2).to receive(:topic).and_return(topic2)&lt;br /&gt;
      expect(student_task2.topic_name).to eq(&amp;quot;TestReview&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns - for blank name' do&lt;br /&gt;
      expect(student_task.topic_name).to eq(&amp;quot;-&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Verifies completion status of a student task&lt;br /&gt;
  describe &amp;quot;#complete?&amp;quot; do&lt;br /&gt;
    it 'verifies a student task is complete' do&lt;br /&gt;
      allow(student_task).to receive(:stage_deadline).and_return('Complete')&lt;br /&gt;
      expect(student_task.complete?).to be true&lt;br /&gt;
    end&lt;br /&gt;
    it 'verifies a nil stage_deadline to not be complete' do&lt;br /&gt;
      allow(student_task).to receive(:stage_deadline).and_return('')&lt;br /&gt;
      expect(student_task.complete?).to be false&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # tests if hyperlinks or other content is submitted during the submission stage&lt;br /&gt;
  # current stage must be submission&lt;br /&gt;
  # participant has to belong to a team&lt;br /&gt;
  # the team has submitted some content&lt;br /&gt;
  describe &amp;quot;content_submitted_in_current_stage?&amp;quot; do&lt;br /&gt;
    it 'checks if content is submitted during submission stage'do&lt;br /&gt;
       student_task.current_stage = &amp;quot;submission&amp;quot;&lt;br /&gt;
       allow(participant).to receive(:team).and_return([team])&lt;br /&gt;
       allow(participant.team).to receive(:has_submissions?).and_return(true)&lt;br /&gt;
       expect(student_task.content_submitted_in_current_stage?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Tests the updating of the @hyperlinks instance variable based on participant's team&lt;br /&gt;
  # Does not verify operation of ||= call, only tests cases of right hand side&lt;br /&gt;
  describe &amp;quot;#hyperlinks&amp;quot; do&lt;br /&gt;
    it 'returns empty array if participant has no team' do&lt;br /&gt;
      allow(student_task).to receive_message_chain(:participant, :team, :nil?).and_return(true)&lt;br /&gt;
      expect(student_task.hyperlinks).to eq([])&lt;br /&gt;
    end&lt;br /&gt;
    it 'assigns returns populated hyperlinks instance if participant has team' do&lt;br /&gt;
      allow(student_task).to receive_message_chain(:participant, :team, :hyperlinks).and_return(['something'])&lt;br /&gt;
      allow(student_task).to receive_message_chain(:participant, :team, :nil?).and_return(false)&lt;br /&gt;
      expect(student_task.hyperlinks).to eq(['something'])&lt;br /&gt;
    end 	&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Verifies incomplete status of student task&lt;br /&gt;
  describe &amp;quot;#incomplete?&amp;quot; do&lt;br /&gt;
    it 'checks a student_task is incomplete' do&lt;br /&gt;
      expect(student_task.incomplete?).to be true&lt;br /&gt;
    end 	&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Verifies that a task has not started&lt;br /&gt;
  describe &amp;quot;#not_started?&amp;quot; do&lt;br /&gt;
    it 'verfies started status' do&lt;br /&gt;
      allow(student_task).to receive(:in_work_stage?).and_return(true)&lt;br /&gt;
      allow(student_task).to receive(:started?).and_return(true)&lt;br /&gt;
      expect(student_task.not_started?).to eq(false)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'is not started due to work stage' do&lt;br /&gt;
      allow(student_task).to receive(:in_work_stage?).and_return(false)&lt;br /&gt;
      allow(student_task).to receive(:started?).and_return(true)&lt;br /&gt;
      expect(student_task.not_started?).to eq(false)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  # Tests relative_deadline for proper assignment when stage_deadline is present&lt;br /&gt;
  describe &amp;quot;#relative_deadline&amp;quot; do&lt;br /&gt;
    it 'returns false without a valid stage deadline' do&lt;br /&gt;
      allow(student_task).to receive(:stage_deadline).and_return(nil)&lt;br /&gt;
      expect(student_task.relative_deadline).to be_falsey&lt;br /&gt;
    end&lt;br /&gt;
    it 'verifies a valid case where stage_deadline is present' do&lt;br /&gt;
      allow(student_task).to receive(:stage_deadline).and_return(true)&lt;br /&gt;
      allow(student_task).to receive(:time_ago_in_words).and_return(&amp;quot;astring&amp;quot;)&lt;br /&gt;
      expect(student_task.relative_deadline).to eq(&amp;quot;astring&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Examines a task to determine if the task is a revision&lt;br /&gt;
  describe &amp;quot;#revision?&amp;quot; do&lt;br /&gt;
    it 'returns true if content is submitted' do&lt;br /&gt;
      allow(student_task).to receive(:content_submitted_in_current_stage?).and_return(true)&lt;br /&gt;
      allow(student_task).to receive(:reviews_given_in_current_stage?).and_return(false)&lt;br /&gt;
      allow(student_task).to receive(:metareviews_given_in_current_stage?).and_return(false)&lt;br /&gt;
      expect(student_task.revision?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns true if reviews given is true' do&lt;br /&gt;
      allow(student_task).to receive(:content_submitted_in_current_stage?).and_return(false)&lt;br /&gt;
      allow(student_task).to receive(:reviews_given_in_current_stage?).and_return(true)&lt;br /&gt;
      allow(student_task).to receive(:metareviews_given_in_current_stage?).and_return(false)&lt;br /&gt;
      expect(student_task.revision?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'returns true if metareviews given is true' do&lt;br /&gt;
      allow(student_task).to receive(:content_submitted_in_current_stage?).and_return(false)&lt;br /&gt;
      allow(student_task).to receive(:reviews_given_in_current_stage?).and_return(false)&lt;br /&gt;
      allow(student_task).to receive(:metareviews_given_in_current_stage?).and_return(true)&lt;br /&gt;
      expect(student_task.revision?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  # Checks if metareview was given in current task stage&lt;br /&gt;
  describe &amp;quot;#metreviews_given_in_current_stage?&amp;quot; do&lt;br /&gt;
    it 'return true' do&lt;br /&gt;
      student_task.current_stage = &amp;quot;metareview&amp;quot;&lt;br /&gt;
      allow(student_task).to receive(:metareviews_given?).and_return(true)&lt;br /&gt;
      expect(student_task.metareviews_given_in_current_stage?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  # Checks if review was given in current task stage&lt;br /&gt;
  describe &amp;quot;#reviews_given_in_current_stage?&amp;quot; do&lt;br /&gt;
    it 'return true' do&lt;br /&gt;
      student_task.current_stage = &amp;quot;review&amp;quot;&lt;br /&gt;
      allow(student_task).to receive(:reviews_given?).and_return(true)&lt;br /&gt;
      expect(student_task.reviews_given_in_current_stage?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # tests whether a student task has been started&lt;br /&gt;
  # if the task is not incomplete &amp;amp;&amp;amp; is not in the revision stage&lt;br /&gt;
  # started? returns false&lt;br /&gt;
  # if the task is incomplete &amp;amp;&amp;amp; is in the revision stage&lt;br /&gt;
  # started? returns true&lt;br /&gt;
  describe &amp;quot;#started?&amp;quot; do&lt;br /&gt;
    it 'is not started' do&lt;br /&gt;
      allow(student_task).to receive(:incomplete?).and_return(false)&lt;br /&gt;
      allow(student_task).to receive(:revision?).and_return(false)&lt;br /&gt;
      expect(student_task.started?).to eq(false)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it 'is started' do&lt;br /&gt;
      allow(student_task).to receive(:incomplete?).and_return(true)&lt;br /&gt;
      allow(student_task).to receive(:revision?).and_return(true)&lt;br /&gt;
      expect(student_task.started?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Tests works stage to ensure state is represented correctly&lt;br /&gt;
  describe &amp;quot;#in_work_stage?&amp;quot; do&lt;br /&gt;
    it &amp;quot;is true, submission is a work stage&amp;quot; do&lt;br /&gt;
      allow(student_task).to receive(:current_stage).and_return(&amp;quot;submission&amp;quot;)&lt;br /&gt;
      expect(student_task.in_work_stage?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
    it &amp;quot;is true, review is a work stage&amp;quot; do&lt;br /&gt;
      allow(student_task).to receive(:current_stage).and_return(&amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(student_task.in_work_stage?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
    it &amp;quot;is true, metareview is a work stage&amp;quot; do&lt;br /&gt;
      allow(student_task).to receive(:current_stage).and_return(&amp;quot;metareview&amp;quot;)&lt;br /&gt;
      expect(student_task.in_work_stage?).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
    it &amp;quot;is false, empty object&amp;quot; do&lt;br /&gt;
      allow(student_task).to receive(:current_stage).and_return(&amp;quot;&amp;quot;)&lt;br /&gt;
      expect(student_task.in_work_stage?).to eq(false)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Tests teamed students method which returns the unique students that are paired with the student at some point&lt;br /&gt;
  # within their course&lt;br /&gt;
  describe &amp;quot;#teamed_students&amp;quot; do&lt;br /&gt;
    context 'when not in any team' do&lt;br /&gt;
      it 'returns empty' do&lt;br /&gt;
        expect(StudentTask.teamed_students(user3)).to eq({})&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when assigned in a cource_team ' do&lt;br /&gt;
      it 'returns empty' do&lt;br /&gt;
        allow(user).to receive(:teams).and_return([course_team])&lt;br /&gt;
        expect(StudentTask.teamed_students(user)).to eq({})&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when assigned in a assignment_team ' do&lt;br /&gt;
      it 'returns the students they are teamed with' do&lt;br /&gt;
        allow(user).to receive(:teams).and_return([team])&lt;br /&gt;
        allow(AssignmentParticipant).to receive(:find_by).with(user_id: 1, parent_id: assignment.id).and_return(participant)&lt;br /&gt;
        allow(AssignmentParticipant).to receive(:find_by).with(user_id: 5, parent_id: assignment.id).and_return(participant2)&lt;br /&gt;
        allow(Assignment).to receive(:find_by).with(id: team.parent_id).and_return(assignment)&lt;br /&gt;
        expect(StudentTask.teamed_students(user)).to eq({assignment.course_id =&amp;gt; [user2.fullname]})&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Gets the due dates of an assigment&lt;br /&gt;
  describe &amp;quot;#get_due_date_data&amp;quot; do&lt;br /&gt;
    context 'when called with assignment having empty due dates' do&lt;br /&gt;
      it &amp;quot;return empty time_list array&amp;quot; do&lt;br /&gt;
        timeline_list = []&lt;br /&gt;
        StudentTask.get_due_date_data(assignment, timeline_list)&lt;br /&gt;
        expect(timeline_list).to eq([])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  context 'when called with assignment having due date' do&lt;br /&gt;
    context 'and due_at value nil' do&lt;br /&gt;
      it &amp;quot;return empty time_list array&amp;quot; do&lt;br /&gt;
        allow(due_date).to receive(:deadline_type).and_return(deadline_type)&lt;br /&gt;
        timeline_list = []&lt;br /&gt;
        due_date.due_at=nil;&lt;br /&gt;
        assignment.due_dates = [due_date]&lt;br /&gt;
        StudentTask.get_due_date_data(assignment, timeline_list)&lt;br /&gt;
        expect(timeline_list).to eq([])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'and due_at value not nil' do&lt;br /&gt;
      it &amp;quot;return time_list array&amp;quot; do&lt;br /&gt;
        allow(due_date).to receive(:deadline_type).and_return(deadline_type)&lt;br /&gt;
        timeline_list = []&lt;br /&gt;
        assignment.due_dates = [due_date]&lt;br /&gt;
        StudentTask.get_due_date_data(assignment, timeline_list)&lt;br /&gt;
        expect(timeline_list).to eq([{&lt;br /&gt;
                                          :label=&amp;gt;(due_date.deadline_type.name + ' Deadline').humanize,&lt;br /&gt;
                                          :updated_at=&amp;gt;due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
                                      }])&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Verifies fetching of peer review data of a user and a timeline&lt;br /&gt;
  describe &amp;quot;#get_peer_review_data&amp;quot; do&lt;br /&gt;
    context 'when no review response mapped' do&lt;br /&gt;
      it 'returns empty' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        StudentTask.get_peer_review_data(user2,timeline_list)&lt;br /&gt;
        expect(timeline_list).to eq([])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when mapped to review response map' do&lt;br /&gt;
      it 'returns timeline array' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        allow(ReviewResponseMap).to receive_message_chain(:where, :find_each).with(reviewer_id: 1).with(no_args).and_yield(review_response_map)&lt;br /&gt;
        allow(review_response_map).to receive(:id).and_return(1)&lt;br /&gt;
        allow(Response).to receive_message_chain(:where, :last).with(map_id: 1).with(no_args).and_return(response)&lt;br /&gt;
        allow(response).to receive(:round).and_return(1)&lt;br /&gt;
        allow(response).to receive(:updated_at).and_return(Time.new(2019))&lt;br /&gt;
        timevalue = Time.new(2019).strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
        expect(StudentTask.get_peer_review_data(1,timeline_list)).to eq([{:id=&amp;gt;1, :label=&amp;gt;&amp;quot;Round 1 peer review&amp;quot;, :updated_at=&amp;gt;timevalue}])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  # Verifies retrieval of feedback from author&lt;br /&gt;
  describe &amp;quot;#get_author_feedback_data&amp;quot; do&lt;br /&gt;
    context 'when no feedback response mapped' do&lt;br /&gt;
      it 'returns empty' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        StudentTask.get_author_feedback_data(user2,timeline_list)&lt;br /&gt;
        expect(timeline_list).to eq([])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when mapped to feedback response map' do&lt;br /&gt;
      it 'returns timeline array' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        allow(FeedbackResponseMap).to receive_message_chain(:where, :find_each).with(reviewer_id: 1).with(no_args).and_yield(review_response_map)&lt;br /&gt;
        allow(review_response_map).to receive(:id).and_return(1)&lt;br /&gt;
        allow(Response).to receive_message_chain(:where, :last).with(map_id: 1).with(no_args).and_return(response)&lt;br /&gt;
        allow(response).to receive(:updated_at).and_return(Time.now)&lt;br /&gt;
        timevalue = Time.now.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
        expect(StudentTask.get_author_feedback_data(1,timeline_list)).to eq([{:id=&amp;gt;1, :label=&amp;gt;&amp;quot;Author feedback&amp;quot;, :updated_at=&amp;gt;timevalue}])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Verrifies retrieval of submission data from submission&lt;br /&gt;
  describe '#get_submission_data' do&lt;br /&gt;
    context 'when no submission data mapped' do&lt;br /&gt;
      it 'returns nil' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        expect(StudentTask.get_submission_data(1,1,timeline_list)).to eq(nil)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when submission data mapped and not submit hyperlink or Remove hyperlink' do&lt;br /&gt;
      it 'returns timeline_list' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        allow(SubmissionRecord).to receive_message_chain(:where, :find_each).with(team_id: 1, assignment_id: 1).with(no_args).and_yield(submission_record)&lt;br /&gt;
        allow(submission_record).to receive(:operation).and_return('testing_label')&lt;br /&gt;
        allow(submission_record).to receive(:updated_at).and_return(Time.new(2019))&lt;br /&gt;
        timevalue = Time.new(2019).strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
        expect(StudentTask.get_submission_data(1,1,timeline_list)).to eq([{:label=&amp;gt;&amp;quot;Testing label&amp;quot;, :updated_at=&amp;gt;timevalue}])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when submission data mapped and operation is submit_hyperlink' do&lt;br /&gt;
      it 'returns timeline_list with link' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        allow(SubmissionRecord).to receive_message_chain(:where, :find_each).with(team_id: 1, assignment_id: 1).with(no_args).and_yield(submission_record)&lt;br /&gt;
        allow(submission_record).to receive(:operation).and_return('Submit Hyperlink')&lt;br /&gt;
        allow(submission_record).to receive(:updated_at).and_return(Time.new(2019))&lt;br /&gt;
        timevalue = Time.new(2019).strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
        expect(StudentTask.get_submission_data(1,1,timeline_list)).to eq([{:label=&amp;gt;&amp;quot;Submit hyperlink&amp;quot;, :updated_at=&amp;gt;timevalue, :link=&amp;gt;&amp;quot;www.wolfware.edu&amp;quot;}])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when submission data mapped and operation is Remove Hyperlink' do&lt;br /&gt;
      it 'returns timeline_list with link' do&lt;br /&gt;
        timeline_list=[]&lt;br /&gt;
        allow(SubmissionRecord).to receive_message_chain(:where, :find_each).with(team_id: 1, assignment_id: 1).with(no_args).and_yield(submission_record)&lt;br /&gt;
        allow(submission_record).to receive(:operation).and_return('Remove Hyperlink')&lt;br /&gt;
        timevalue = Time.new(2019).strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
        allow(submission_record).to receive(:updated_at).and_return(Time.new(2019))&lt;br /&gt;
        expect(StudentTask.get_submission_data(1,1,timeline_list)).to eq([{:label=&amp;gt;&amp;quot;Remove hyperlink&amp;quot;, :updated_at=&amp;gt;timevalue, :link=&amp;gt;&amp;quot;www.wolfware.edu&amp;quot;}])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
  # Verifies retrieval of timeline data&lt;br /&gt;
  describe '#get_timeline_data' do&lt;br /&gt;
    context 'when no timeline data mapped' do&lt;br /&gt;
      it 'returns nil' do&lt;br /&gt;
        expect(StudentTask.get_timeline_data(assignment, participant, team)).to eq([])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Line Coverage achieved ==&lt;br /&gt;
*94 relevant lines&lt;br /&gt;
*86 lines covered&lt;br /&gt;
*8 lines missed&lt;br /&gt;
*Coverage = 91.49%&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
Some of the tests were rather shallow, get_timeline_data specifically needs depth added.&lt;br /&gt;
&lt;br /&gt;
== Video of Tests running ==&lt;br /&gt;
[https://youtu.be/N6H1HtQ4eds]&lt;br /&gt;
&lt;br /&gt;
== Team Members == &lt;br /&gt;
John Bumgardner, Pedro Benitez, Luke McConnaughey&lt;/div&gt;</summary>
		<author><name>Jwbumga2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=135645</id>
		<title>CSC/ECE 517 Fall 2020 - E2055 write unit tests for student task.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=135645"/>
		<updated>2020-10-20T01:17:02Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of the Expertiza based OSS project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza] is an open source project based on [https://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
This project in particular intends that the students collaborate with each other and work on making enhancements to the code base by applying the concepts of Rails,RSpec, DRY code,Test driven development etc. This provides an opportunity for students to contribute to an open source project and learn further about software deployment etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About RSpec ==&lt;br /&gt;
&lt;br /&gt;
RSpec is a unit test framework for the Ruby programming language. RSpec is different than traditional xUnit frameworks like JUnit because RSpec is a Behavior driven development tool. What this means is that, tests written in RSpec focus on the &amp;quot;behavior&amp;quot; of an application being tested. RSpec does not put emphasis on, how the application works but instead on how it behaves, in other words, what the application actually does.Each RSpec file contains one or more tests. Each test ensures if a particular feature of our website is working properly.The output of an RSpec run will tell you exactly what features aren't working. The benefit is that tested code is unlikely to break unnoticed.The tests are run every time someone makes, or updates, a [https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests Pull Request].&lt;br /&gt;
&lt;br /&gt;
== DB Schema ==&lt;br /&gt;
Below are the tables that are related ti student task functionality&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/images/7/7a/ExpertizaDbSchema.jpg DB Schema]&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 student_task.rb and student_task_spec.rb. It focuses on writing RSpec unit tests for the code affected or added. The goal of this project is to attempt to add sufficient unit tests to this part of the application and increase its path coverage to above 90 percent.&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* Complete the insufficient unit tests for student_task.rb. &lt;br /&gt;
* Increase path coverage from only 31.91% with 30 lines covered to above 92.55% with 87 lines covered.&lt;br /&gt;
* Cover edge cases.&lt;br /&gt;
* High branch coverage to be achieved.&lt;br /&gt;
&lt;br /&gt;
There are different tasks that a student can perform. &lt;br /&gt;
* He can see all the assignments that he has been assigned to.&lt;br /&gt;
* He can see details of each assignment like marks, his team, send invitation to student to join a team&lt;br /&gt;
* Review other students' work&lt;br /&gt;
&lt;br /&gt;
== Tests Plan ==&lt;br /&gt;
*Mock Objects to test&lt;br /&gt;
*Topic name&lt;br /&gt;
*Complete?&lt;br /&gt;
*Incomplete?&lt;br /&gt;
*Not started?&lt;br /&gt;
*Revision?&lt;br /&gt;
*Met reviews given&lt;br /&gt;
*Teamed student&lt;br /&gt;
*Get due date&lt;br /&gt;
*Get peer review data&lt;br /&gt;
*Get author feedback&lt;br /&gt;
*Get submission data&lt;br /&gt;
*Get timeline data&lt;br /&gt;
&lt;br /&gt;
== Line Coverage achieved ==&lt;br /&gt;
*94 relevant lines&lt;br /&gt;
*80 lines covered&lt;br /&gt;
*14 lines missed&lt;br /&gt;
*Coverage = 85%&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
One major issue we encountered was reaching the goal of exceeding 90% test coverage. We seem to have converged around 85%.&lt;br /&gt;
&lt;br /&gt;
== Video of Tests running ==&lt;br /&gt;
[https://youtu.be/N6H1HtQ4eds]&lt;br /&gt;
&lt;br /&gt;
== Team Members == &lt;br /&gt;
John Bumgardner, Pedro Benitez, Luke McConnaughey&lt;/div&gt;</summary>
		<author><name>Jwbumga2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=135638</id>
		<title>CSC/ECE 517 Fall 2020 - E2055 write unit tests for student task.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=135638"/>
		<updated>2020-10-20T01:00:31Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of the Expertiza based OSS project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza] is an open source project based on [https://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
This project in particular intends that the students collaborate with each other and work on making enhancements to the code base by applying the concepts of Rails,RSpec, DRY code,Test driven development etc. This provides an opportunity for students to contribute to an open source project and learn further about software deployment etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About RSpec ==&lt;br /&gt;
&lt;br /&gt;
RSpec is a unit test framework for the Ruby programming language. RSpec is different than traditional xUnit frameworks like JUnit because RSpec is a Behavior driven development tool. What this means is that, tests written in RSpec focus on the &amp;quot;behavior&amp;quot; of an application being tested. RSpec does not put emphasis on, how the application works but instead on how it behaves, in other words, what the application actually does.Each RSpec file contains one or more tests. Each test ensures if a particular feature of our website is working properly.The output of an RSpec run will tell you exactly what features aren't working. The benefit is that tested code is unlikely to break unnoticed.The tests are run every time someone makes, or updates, a [https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests Pull Request].&lt;br /&gt;
&lt;br /&gt;
== DB Schema ==&lt;br /&gt;
Below are the tables that are related ti student task functionality&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/images/7/7a/ExpertizaDbSchema.jpg DB Schema]&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 student_task.rb and student_task_spec.rb. It focuses on writing RSpec unit tests for the code affected or added. The goal of this project is to attempt to add sufficient unit tests to this part of the application and increase its path coverage to above 90 percent.&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* Complete the insufficient unit tests for student_task.rb. &lt;br /&gt;
* Increase path coverage from only 31.91% with 30 lines covered to above 92.55% with 87 lines covered.&lt;br /&gt;
* Cover edge cases.&lt;br /&gt;
* High branch coverage to be achieved.&lt;br /&gt;
&lt;br /&gt;
There are different tasks that a student can perform. &lt;br /&gt;
* He can see all the assignments that he has been assigned to.&lt;br /&gt;
* He can see details of each assignment like marks, his team, send invitation to student to join a team&lt;br /&gt;
* Review other students' work&lt;br /&gt;
&lt;br /&gt;
== Tests Plan ==&lt;br /&gt;
*Mock Objects to test&lt;br /&gt;
*Topic name&lt;br /&gt;
*Complete?&lt;br /&gt;
*Incomplete?&lt;br /&gt;
*Not started?&lt;br /&gt;
*Revision?&lt;br /&gt;
*Met reviews given&lt;br /&gt;
*Teamed student&lt;br /&gt;
*Get due date&lt;br /&gt;
*Get peer review data&lt;br /&gt;
*Get author feedback&lt;br /&gt;
*Get submission data&lt;br /&gt;
*Get timeline data&lt;br /&gt;
&lt;br /&gt;
== Line Coverage achieved ==&lt;br /&gt;
*94 relevant lines&lt;br /&gt;
*80 lines covered&lt;br /&gt;
*14 lines missed&lt;br /&gt;
*Coverage = 85%&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
One major issue we encountered was reaching the goal of exceeding 90% test coverage. We seem to have converged around 85%.&lt;br /&gt;
&lt;br /&gt;
== Team Members == &lt;br /&gt;
John Bumgardner, Pedro Benitez, Luke McConnaughey&lt;/div&gt;</summary>
		<author><name>Jwbumga2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=135636</id>
		<title>CSC/ECE 517 Fall 2020 - E2055 write unit tests for student task.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=135636"/>
		<updated>2020-10-20T00:58:56Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: /* Tests Written */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of the Expertiza based OSS project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza] is an open source project based on [https://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
This project in particular intends that the students collaborate with each other and work on making enhancements to the code base by applying the concepts of Rails,RSpec, DRY code,Test driven development etc. This provides an opportunity for students to contribute to an open source project and learn further about software deployment etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About RSpec ==&lt;br /&gt;
&lt;br /&gt;
RSpec is a unit test framework for the Ruby programming language. RSpec is different than traditional xUnit frameworks like JUnit because RSpec is a Behavior driven development tool. What this means is that, tests written in RSpec focus on the &amp;quot;behavior&amp;quot; of an application being tested. RSpec does not put emphasis on, how the application works but instead on how it behaves, in other words, what the application actually does.Each RSpec file contains one or more tests. Each test ensures if a particular feature of our website is working properly.The output of an RSpec run will tell you exactly what features aren't working. The benefit is that tested code is unlikely to break unnoticed.The tests are run every time someone makes, or updates, a [https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests Pull Request].&lt;br /&gt;
&lt;br /&gt;
== DB Schema ==&lt;br /&gt;
Below are the tables that are related ti student task functionality&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/images/7/7a/ExpertizaDbSchema.jpg DB Schema]&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 student_task.rb and student_task_spec.rb. It focuses on writing RSpec unit tests for the code affected or added. The goal of this project is to attempt to add sufficient unit tests to this part of the application and increase its path coverage to above 90 percent.&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* Complete the insufficient unit tests for student_task.rb. &lt;br /&gt;
* Increase path coverage from only 31.91% with 30 lines covered to above 92.55% with 87 lines covered.&lt;br /&gt;
* Cover edge cases.&lt;br /&gt;
* High branch coverage to be achieved.&lt;br /&gt;
&lt;br /&gt;
There are different tasks that a student can perform. &lt;br /&gt;
* He can see all the assignments that he has been assigned to.&lt;br /&gt;
* He can see details of each assignment like marks, his team, send invitation to student to join a team&lt;br /&gt;
* Review other students' work&lt;br /&gt;
&lt;br /&gt;
== Tests Plan ==&lt;br /&gt;
*Mock Objects to test&lt;br /&gt;
*Topic name&lt;br /&gt;
*Complete?&lt;br /&gt;
*Incomplete?&lt;br /&gt;
*Not started?&lt;br /&gt;
*Revision?&lt;br /&gt;
*Met reviews given&lt;br /&gt;
*Teamed student&lt;br /&gt;
*Get due date&lt;br /&gt;
*Get peer review data&lt;br /&gt;
*Get author feedback&lt;br /&gt;
*Get submission data&lt;br /&gt;
*Get timeline data&lt;br /&gt;
&lt;br /&gt;
== Line Coverage achieved ==&lt;br /&gt;
*94 relevant lines&lt;br /&gt;
*80 lines covered&lt;br /&gt;
*14 lines missed&lt;br /&gt;
*Coverage = 85%&lt;br /&gt;
&lt;br /&gt;
== Team Members == &lt;br /&gt;
John Bumgardner, Pedro Benitez, Luke McConnaughey&lt;/div&gt;</summary>
		<author><name>Jwbumga2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=135634</id>
		<title>CSC/ECE 517 Fall 2020 - E2055 write unit tests for student task.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=135634"/>
		<updated>2020-10-20T00:57:17Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of the Expertiza based OSS project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza] is an open source project based on [https://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
This project in particular intends that the students collaborate with each other and work on making enhancements to the code base by applying the concepts of Rails,RSpec, DRY code,Test driven development etc. This provides an opportunity for students to contribute to an open source project and learn further about software deployment etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About RSpec ==&lt;br /&gt;
&lt;br /&gt;
RSpec is a unit test framework for the Ruby programming language. RSpec is different than traditional xUnit frameworks like JUnit because RSpec is a Behavior driven development tool. What this means is that, tests written in RSpec focus on the &amp;quot;behavior&amp;quot; of an application being tested. RSpec does not put emphasis on, how the application works but instead on how it behaves, in other words, what the application actually does.Each RSpec file contains one or more tests. Each test ensures if a particular feature of our website is working properly.The output of an RSpec run will tell you exactly what features aren't working. The benefit is that tested code is unlikely to break unnoticed.The tests are run every time someone makes, or updates, a [https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests Pull Request].&lt;br /&gt;
&lt;br /&gt;
== DB Schema ==&lt;br /&gt;
Below are the tables that are related ti student task functionality&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/images/7/7a/ExpertizaDbSchema.jpg DB Schema]&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 student_task.rb and student_task_spec.rb. It focuses on writing RSpec unit tests for the code affected or added. The goal of this project is to attempt to add sufficient unit tests to this part of the application and increase its path coverage to above 90 percent.&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* Complete the insufficient unit tests for student_task.rb. &lt;br /&gt;
* Increase path coverage from only 31.91% with 30 lines covered to above 92.55% with 87 lines covered.&lt;br /&gt;
* Cover edge cases.&lt;br /&gt;
* High branch coverage to be achieved.&lt;br /&gt;
&lt;br /&gt;
There are different tasks that a student can perform. &lt;br /&gt;
* He can see all the assignments that he has been assigned to.&lt;br /&gt;
* He can see details of each assignment like marks, his team, send invitation to student to join a team&lt;br /&gt;
* Review other students' work&lt;br /&gt;
&lt;br /&gt;
== Tests Written ==&lt;br /&gt;
*Mock Objects to test&lt;br /&gt;
*Topic name&lt;br /&gt;
*Complete?&lt;br /&gt;
*Incomplete?&lt;br /&gt;
*Not started?&lt;br /&gt;
*Revision?&lt;br /&gt;
*Met reviews given&lt;br /&gt;
*Teamed student&lt;br /&gt;
*Get due date&lt;br /&gt;
*Get peer review data&lt;br /&gt;
*Get author feedback&lt;br /&gt;
*Get submission data&lt;br /&gt;
*Get timeline data&lt;br /&gt;
&lt;br /&gt;
== Line Coverage achieved ==&lt;br /&gt;
*94 relevant lines&lt;br /&gt;
*80 lines covered&lt;br /&gt;
*14 lines missed&lt;br /&gt;
*Coverage = 85%&lt;br /&gt;
&lt;br /&gt;
== Team Members == &lt;br /&gt;
John Bumgardner, Pedro Benitez, Luke McConnaughey&lt;/div&gt;</summary>
		<author><name>Jwbumga2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=134783</id>
		<title>CSC/ECE 517 Fall 2020 - E2055 write unit tests for student task.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2020_-_E2055_write_unit_tests_for_student_task.rb&amp;diff=134783"/>
		<updated>2020-10-13T01:12:08Z</updated>

		<summary type="html">&lt;p&gt;Jwbumga2: Created page with &amp;quot;This page provides a description of the Expertiza based OSS project.   == About Expertiza ==  [https://expertiza.ncsu.edu/ Expertiza] is an open source project based on [https...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides a description of the Expertiza based OSS project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza] is an open source project based on [https://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
This project in particular intends that the students collaborate with each other and work on making enhancements to the code base by applying the concepts of Rails,RSpec, DRY code,Test driven development etc. This provides an opportunity for students to contribute to an open source project and learn further about software deployment etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About RSpec ==&lt;br /&gt;
&lt;br /&gt;
RSpec is a unit test framework for the Ruby programming language. RSpec is different than traditional xUnit frameworks like JUnit because RSpec is a Behavior driven development tool. What this means is that, tests written in RSpec focus on the &amp;quot;behavior&amp;quot; of an application being tested. RSpec does not put emphasis on, how the application works but instead on how it behaves, in other words, what the application actually does.Each RSpec file contains one or more tests. Each test ensures if a particular feature of our website is working properly.The output of an RSpec run will tell you exactly what features aren't working. The benefit is that tested code is unlikely to break unnoticed.The tests are run every time someone makes, or updates, a [https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests Pull Request].&lt;br /&gt;
&lt;br /&gt;
== DB Schema ==&lt;br /&gt;
Below are the tables that are related ti student task functionality&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/images/7/7a/ExpertizaDbSchema.jpg DB Schema]&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 student_task.rb and student_task_spec.rb. It focuses on writing RSpec unit tests for the code affected or added. The goal of this project is to attempt to add sufficient unit tests to this part of the application and increase its path coverage to above 90 percent.&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* Complete the insufficient unit tests for student_task.rb. &lt;br /&gt;
* Increase path coverage from only 31.91% with 30 lines covered to above 92.55% with 87 lines covered.&lt;br /&gt;
* Cover edge cases.&lt;br /&gt;
* High branch coverage to be achieved.&lt;br /&gt;
&lt;br /&gt;
There are different tasks that a student can perform. &lt;br /&gt;
* He can see all the assignments that he has been assigned to.&lt;br /&gt;
* He can see details of each assignment like marks, his team, send invitation to student to join a team&lt;br /&gt;
* Review other students' work&lt;br /&gt;
&lt;br /&gt;
== Team Members == &lt;br /&gt;
John Bumgardner, Pedro Benitez, Luke McConnaughey&lt;/div&gt;</summary>
		<author><name>Jwbumga2</name></author>
	</entry>
</feed>