<?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=Mamoran</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=Mamoran"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Mamoran"/>
	<updated>2026-09-18T19:16:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108946</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108946"/>
		<updated>2017-05-09T04:17:27Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. We would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
# There should be a tabbed view to switch between the various review views.&lt;br /&gt;
#* Tab 1: Reviews&lt;br /&gt;
#* Tab 2: Author Feedback&lt;br /&gt;
#* Tab 3: Statistics&lt;br /&gt;
#* Tab 4: Heat grid&lt;br /&gt;
# There should be a way to gray out/hide the criteria (i.e. questions) so that the responses stand out more clearly.&lt;br /&gt;
# There should be a way to search all reviews of particular view which contain a given text string.&lt;br /&gt;
# Whitespace should be reduced on the review headings by including the review number, review round, and last reviewed time on a single line (left, center, and right justified respectively).&lt;br /&gt;
# The &amp;quot;Give feedback for Review #&amp;quot; link should not be visible unless the reivew has been expanded&lt;br /&gt;
# The &amp;quot;Give feedback for Review #&amp;quot; link should be at the top and bottom of the review after the review has been expanded.&lt;br /&gt;
# There should be a separate &amp;quot;Show all reviews&amp;quot; link for each round instead of having a single &amp;quot;Show all reviews&amp;quot; link.&lt;br /&gt;
# There should not be so much space between Round 2 and the Reputation.&lt;br /&gt;
# The unnecessary whitespace between the checkbox questions should be removed.&lt;br /&gt;
# The project should focus on the reduction of redundant code within views, controllers, and models where applicable&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Statistics&lt;br /&gt;
# Heat Grid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heat grid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|-&lt;br /&gt;
| rails-ajax&lt;br /&gt;
| Gem&lt;br /&gt;
| Enable AJAX to refresh containers within views without reloading the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. We will use this pattern to logically segregate our interface from the business logic implementation. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects. We will use this pattern to access the persistent storage in a standard way and to generate object representations of the records.&lt;br /&gt;
&lt;br /&gt;
'''Factory Method''' - A creational software design pattern which allows a class to instantiate objects but defer the creation to subclasses of the parent class. We will use this pattern in various places to generate objects for either students or instructors based on the user's role at the time of instantiation. This will allow us to have a single class to interact with from the controller and views but remain flexible enough to accommodate the needs of the different user types.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Low Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Screen Mockups====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Collapsed Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Collapsed_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Expanded Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Expanded_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Class Diagram====&lt;br /&gt;
The following diagram shows what classes and their methods will be modified&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:E1735._UI_changes_for_review_and_score_reports_-_Page_1.jpeg]]&lt;br /&gt;
&lt;br /&gt;
====Files Changed====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! File&lt;br /&gt;
! Changes&lt;br /&gt;
|-&lt;br /&gt;
| grades_controller.rb&lt;br /&gt;
| Add extra methods for filters of student names, team names, or assignment titles.  Edit the index and show methods to support new tabs and expansion areas in the display.&lt;br /&gt;
|-&lt;br /&gt;
| view_my_scores.html.erb&lt;br /&gt;
| Edit arguments passed and linkage to the new display tabs.&lt;br /&gt;
|-&lt;br /&gt;
| _summary_reviews.html.erb&lt;br /&gt;
| Add more expansion areas to the display to organize the reviews.&lt;br /&gt;
|-&lt;br /&gt;
| _reviewTabs.html.erb&lt;br /&gt;
| Add new display tabs by building on the current test suite in this file.&lt;br /&gt;
|-&lt;br /&gt;
| _searchbox.html.erb&lt;br /&gt;
| Edit linkage to point to the new search method in grades_controller.rb&lt;br /&gt;
|-&lt;br /&gt;
| _reviews.html.erb&lt;br /&gt;
| Updates for displaying the new header styles, feedback text. Remove spacing fixes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
For testing, we built off the existing test framework which implemented RSPEC.  The goal of our testing is to verify that the existing functionality is still present in the new views and is accessible to both the student and the instructor.  Below are the tests that have been modified or created to verify the changed functionality.  Any other tests not listed below are assumed to be unmodified and are intended to still work with the new updates. Note that some requirements of this project cannot be verified with the script such as formatting changes, but any functional modifications to the layout will be verified.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 1&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 2&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 3&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 4&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Future Changes and Improvements==&lt;br /&gt;
The goal of this project was to standardize the student and instructor scores report views into a single view and have it display the information appropriately. Due to time constraints we were unable to complete the merge of the student scores report into our newly created tabbed interface. Currently, only the instructors scores report view (grades/view) has the tabbed interface. Below are some suggestion on how to complete the functionality and to further improve it.&lt;br /&gt;
&lt;br /&gt;
===Consolidate Student and Instructor Views===&lt;br /&gt;
The student scores report (grades/view_my_scores) contains much the same information as the instructors scores report (grades/view). Further, the information is displayed nearly identically and there is a lot of overlap in the code which renders the various pieces of information such as the code to build the reviews list, the author feedback list, and the heat grids. Our suggestion is to complete analysis of the view_my_scores and view methods within the grades_controller.rb file as well as on the view_my_scores.html.erb and view.html.erb files to determine how to standardize the structuring of the information so that a single view can render the page for both students and instructors.&lt;br /&gt;
&lt;br /&gt;
Students will see information pertaining to their team and to themselves (as a participant) whereas instructors see similar information pertaining to all teams and all participants. We suspect that the student report is simply a subset of the instructor's view which lists only a single team and only a single participant on that team. The user role can be used within the controller to determine whether to pull all information or only a subset of the information into the data structures which are used by the view and partials. In the case of a student, the overall class statistics can be excluded from rendering on the page. The student's team can remain in a collapsible table row with the team name, average, and range on it, the only difference would be that there is only one team on the page. Within the tabs, the reviews tab need not change since they refer to the team as a whole. On the Author Feedback, Metareviews, and Heat Grid tabs, the information should be specific only for the student (i.e. the student should be the only participant listed). The Teammate Reviews tab will display nothing as student's should not be able to see their feedback and scores.&lt;br /&gt;
&lt;br /&gt;
===Distribute Heat Grids to Related Tabs===&lt;br /&gt;
The heat grids are simply a way of quickly visualizing the scores for the various questions on a rubric. There are heat grids for submission reviews, author feedback, metareviews, and teammate reviews. All of these heat grids are displayed on view together (grades/view_team) for each participant. Some things which are important to note are that the submission reviews heatgrid is identical for all participants on a team together since the submission review scores apply to all of them as a team. Also, if there are no teammate reviews, metareviews, or author feedbacks available for the participant then those heat grids are not displayed.&lt;br /&gt;
&lt;br /&gt;
Currently, in the instructors view, the heat grids are linked for each participant on the team on the Heat Grid tab. Our intention was to render the submission reviews heat grid within this tab as its own partial and then render the participant specific heat grids in collapsible table rows for each participant on the team. We suggest that a better option would be to get rid of the heat grid view (grades/view_team) and the Heat Grid tab and instead render the heat grids in the remaining tabs with their related information. For example, the submission reviews heat grid can be rendered at the top of the Reviews tab and the Author Feedback heat grids can be rendered for each participant within the collapsible table row for that participant. This would cut down on the code necessary to display this information and also it would group information by its supporting data rather than by the method in which it is rendered.&lt;br /&gt;
&lt;br /&gt;
===Build Heat Grids Using Already Available Data===&lt;br /&gt;
This suggestion relates directly with the previous suggestion of taking the heat grids from their own view and instead rendering them within the tabbed interface. One of the problems with the instructor's scores report view is that it takes a long time to pull back all of the data for every team and participant for an assignment. We would like to cut back on that if possible, but the minimum we should do is avoid adding to it. We had originally planned on rendering the heat grids in the tabbed interface. To avoid additional overhead on the backend we were attempting to call the view_team method of the grades_controller.rb file using AJAX to pull back the custom VmQuestionResponse object for the teams and participants. &lt;br /&gt;
&lt;br /&gt;
VmQuestionResponse is a custom object created by the team which created the heat grid view. It is useful in that all of the data necessary to build all of the heat grids for a participant is available in a single object. Unfortunately, there are several inefficiencies that come into play once we begin rendering the heat grids directly in the score report. First, the submission reviews heat grid is the same for all participants, but the method call would have to be done for every participant on the team so each of them would pull back their own copy of the submission reviews data. Also, the information used to build the heat grids such as rounds, questions, scores, and participants is already present within the scores report view. That same information is used to render the rounds, questions, scores, and participants across all of the various tabs. Pulling back a VmQuestionResponse might be easy, but it is unneeded overhead when the data to render all of the heat grids is already present in the page.&lt;br /&gt;
&lt;br /&gt;
We suggest that the heat grids be modified to use the data which is already present in the view and remove the view_team view, method, and the VmQuestionResponse object and related code.&lt;br /&gt;
&lt;br /&gt;
===Rendering Team Charts and Graphs in Statistics Tab===&lt;br /&gt;
When you view the instructor's scores report you see the overall class statistics render in charts and graphs at the top of the page. When you view the student's scores report you see the team's statistics rendered as charts and graphs in the same place. In an effort to standardize the rendering of this page for both instructors and students we propose that the team's charts and graphs which would normally be rendered when hitting the student score report view (grades/view_my_scores) should be rendered on the Statistics tab for each team. That will ensure that when migrating students to this same view that their information is still available.&lt;br /&gt;
&lt;br /&gt;
One of the problems with the current charts and graphs, particularly the bar graphs, is that they are rendered so small that peak and average numbers displayed on them often overlap. Having them create so small also means that it is harder to accurately visualize differences between bars. Making them larger posed a problem in the previous UI because the page was already so tall and so cluttered with information that it didn't need anything else adding to that. With the statistics now rendering on their own tab, we can easily make a call to the method to generate these graphs slightly larger to make them more readable by passing in larger dimensions.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108565</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108565"/>
		<updated>2017-04-13T04:41:31Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: /* Requirements Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. We would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
# There should be a tabbed view to switch between the various review views.&lt;br /&gt;
#* Tab 1: Reviews&lt;br /&gt;
#* Tab 2: Author Feedback&lt;br /&gt;
#* Tab 3: Statistics&lt;br /&gt;
#* Tab 4: Heat grid&lt;br /&gt;
# There should be a way to gray out/hide the criteria (i.e. questions) so that the responses stand out more clearly.&lt;br /&gt;
# There should be a way to search all reviews of particular view which contain a given text string.&lt;br /&gt;
# Whitespace should be reduced on the review headings by including the review number, review round, and last reviewed time on a single line (left, center, and right justified respectively).&lt;br /&gt;
# The &amp;quot;Give feedback for Review #&amp;quot; link should not be visible unless the reivew has been expanded&lt;br /&gt;
# The &amp;quot;Give feedback for Review #&amp;quot; link should be at the top and bottom of the review after the review has been expanded.&lt;br /&gt;
# There should be a separate &amp;quot;Show all reviews&amp;quot; link for each round instead of having a single &amp;quot;Show all reviews&amp;quot; link.&lt;br /&gt;
# There should not be so much space between Round 2 and the Reputation.&lt;br /&gt;
# The unnecessary whitespace between the checkbox questions should be removed.&lt;br /&gt;
# The project should focus on the reduction of redundant code within views, controllers, and models where applicable&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Statistics&lt;br /&gt;
# Heat Grid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heat grid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|-&lt;br /&gt;
| rails-ajax&lt;br /&gt;
| Gem&lt;br /&gt;
| Enable AJAX to refresh containers within views without reloading the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. We will use this pattern to logically segregate our interface from the business logic implementation. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects. We will use this pattern to access the persistent storage in a standard way and to generate object representations of the records.&lt;br /&gt;
&lt;br /&gt;
'''Factory Method''' - A creational software design pattern which allows a class to instantiate objects but defer the creation to subclasses of the parent class. We will use this pattern in various places to generate objects for either students or instructors based on the user's role at the time of instantiation. This will allow us to have a single class to interact with from the controller and views but remain flexible enough to accommodate the needs of the different user types.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Low Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Screen Mockups====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Collapsed Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Collapsed_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Expanded Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Expanded_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Class Diagram====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Files Changed====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! File&lt;br /&gt;
! Changes&lt;br /&gt;
|-&lt;br /&gt;
| grades_controller.rb&lt;br /&gt;
| Add extra methods for filters of student names, team names, or assignment titles.  Edit the index and show methods to support new tabs and expansion areas in the display.&lt;br /&gt;
|-&lt;br /&gt;
| view_my_scores.html.erb&lt;br /&gt;
| Edit arguments passed and linkage to the new display tabs.&lt;br /&gt;
|-&lt;br /&gt;
| _summary_reviews.html.erb&lt;br /&gt;
| Add more expansion areas to the display to organize the reviews.&lt;br /&gt;
|-&lt;br /&gt;
| _reviewTabs.html.erb&lt;br /&gt;
| Add new display tabs by building on the current test suite in this file.&lt;br /&gt;
|-&lt;br /&gt;
| _searchbox.html.erb&lt;br /&gt;
| Edit linkage to point to the new search method in grades_controller.rb&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
For testing, we built off the existing test framework which implemented RSPEC.  The goal of our testing is to verify that the existing functionality is still present in the new views and is accessible to both the student and the instructor.  Below are the tests that have been modified or created to verify the changed functionality.  Any other tests not listed below are assumed to be unmodified and are intended to still work with the new updates. Note that some requirements of this project cannot be verified with the script such as formatting changes, but any functional modifications to the layout will be verified.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 1&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 2&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 3&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 4&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108564</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108564"/>
		<updated>2017-04-13T04:40:51Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
# There should be a tabbed view to switch between the various review views.&lt;br /&gt;
#* Tab 1: Reviews&lt;br /&gt;
#* Tab 2: Author Feedback&lt;br /&gt;
#* Tab 3: Statistics&lt;br /&gt;
#* Tab 4: Heat grid&lt;br /&gt;
# There should be a way to gray out/hide the criteria (i.e. questions) so that the responses stand out more clearly.&lt;br /&gt;
# There should be a way to search all reviews of particular view which contain a given text string.&lt;br /&gt;
# Whitespace should be reduced on the review headings by including the review number, review round, and last reviewed time on a single line (left, center, and right justified respectively).&lt;br /&gt;
# The &amp;quot;Give feedback for Review #&amp;quot; link should not be visible unless the reivew has been expanded&lt;br /&gt;
# The &amp;quot;Give feedback for Review #&amp;quot; link should be at the top and bottom of the review after the review has been expanded.&lt;br /&gt;
# There should be a separate &amp;quot;Show all reviews&amp;quot; link for each round instead of having a single &amp;quot;Show all reviews&amp;quot; link.&lt;br /&gt;
# There should not be so much space between Round 2 and the Reputation.&lt;br /&gt;
# The unnecessary whitespace between the checkbox questions should be removed.&lt;br /&gt;
# The project should focus on the reduction of redundant code within views, controllers, and models where applicable&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Statistics&lt;br /&gt;
# Heat Grid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heat grid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|-&lt;br /&gt;
| rails-ajax&lt;br /&gt;
| Gem&lt;br /&gt;
| Enable AJAX to refresh containers within views without reloading the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. We will use this pattern to logically segregate our interface from the business logic implementation. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects. We will use this pattern to access the persistent storage in a standard way and to generate object representations of the records.&lt;br /&gt;
&lt;br /&gt;
'''Factory Method''' - A creational software design pattern which allows a class to instantiate objects but defer the creation to subclasses of the parent class. We will use this pattern in various places to generate objects for either students or instructors based on the user's role at the time of instantiation. This will allow us to have a single class to interact with from the controller and views but remain flexible enough to accommodate the needs of the different user types.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Low Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Screen Mockups====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Collapsed Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Collapsed_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Expanded Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Expanded_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Class Diagram====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Files Changed====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! File&lt;br /&gt;
! Changes&lt;br /&gt;
|-&lt;br /&gt;
| grades_controller.rb&lt;br /&gt;
| Add extra methods for filters of student names, team names, or assignment titles.  Edit the index and show methods to support new tabs and expansion areas in the display.&lt;br /&gt;
|-&lt;br /&gt;
| view_my_scores.html.erb&lt;br /&gt;
| Edit arguments passed and linkage to the new display tabs.&lt;br /&gt;
|-&lt;br /&gt;
| _summary_reviews.html.erb&lt;br /&gt;
| Add more expansion areas to the display to organize the reviews.&lt;br /&gt;
|-&lt;br /&gt;
| _reviewTabs.html.erb&lt;br /&gt;
| Add new display tabs by building on the current test suite in this file.&lt;br /&gt;
|-&lt;br /&gt;
| _searchbox.html.erb&lt;br /&gt;
| Edit linkage to point to the new search method in grades_controller.rb&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
For testing, we built off the existing test framework which implemented RSPEC.  The goal of our testing is to verify that the existing functionality is still present in the new views and is accessible to both the student and the instructor.  Below are the tests that have been modified or created to verify the changed functionality.  Any other tests not listed below are assumed to be unmodified and are intended to still work with the new updates. Note that some requirements of this project cannot be verified with the script such as formatting changes, but any functional modifications to the layout will be verified.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 1&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 2&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 3&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 4&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108563</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108563"/>
		<updated>2017-04-13T04:39:17Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: /* Project Purpose */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Requirements===&lt;br /&gt;
# There should be a tabbed view to switch between the various review views.&lt;br /&gt;
#* Tab 1: Reviews&lt;br /&gt;
#* Tab 2: Author Feedback&lt;br /&gt;
#* Tab 3: Statistics&lt;br /&gt;
#* Tab 4: Heat grid&lt;br /&gt;
# There should be a way to gray out/hide the criteria (i.e. questions) so that the responses stand out more clearly.&lt;br /&gt;
# There should be a way to search all reviews of particular view which contain a given text string.&lt;br /&gt;
# Whitespace should be reduced on the review headings by including the review number, review round, and last reviewed time on a single line (left, center, and right justified respectively).&lt;br /&gt;
# The &amp;quot;Give feedback for Review #&amp;quot; link should not be visible unless the reivew has been expanded&lt;br /&gt;
# The &amp;quot;Give feedback for Review #&amp;quot; link should be at the top and bottom of the review after the review has been expanded.&lt;br /&gt;
# There should be a separate &amp;quot;Show all reviews&amp;quot; link for each round instead of having a single &amp;quot;Show all reviews&amp;quot; link.&lt;br /&gt;
# There should not be so much space between Round 2 and the Reputation.&lt;br /&gt;
# The unnecessary whitespace between the checkbox questions should be removed.&lt;br /&gt;
# The project should focus on the reduction of redundant code within views, controllers, and models where applicable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Statistics&lt;br /&gt;
# Heat Grid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heat grid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|-&lt;br /&gt;
| rails-ajax&lt;br /&gt;
| Gem&lt;br /&gt;
| Enable AJAX to refresh containers within views without reloading the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. We will use this pattern to logically segregate our interface from the business logic implementation. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects. We will use this pattern to access the persistent storage in a standard way and to generate object representations of the records.&lt;br /&gt;
&lt;br /&gt;
'''Factory Method''' - A creational software design pattern which allows a class to instantiate objects but defer the creation to subclasses of the parent class. We will use this pattern in various places to generate objects for either students or instructors based on the user's role at the time of instantiation. This will allow us to have a single class to interact with from the controller and views but remain flexible enough to accommodate the needs of the different user types.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Low Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Screen Mockups====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Collapsed Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Collapsed_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Expanded Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Expanded_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Class Diagram====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Files Changed====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! File&lt;br /&gt;
! Changes&lt;br /&gt;
|-&lt;br /&gt;
| grades_controller.rb&lt;br /&gt;
| Add extra methods for filters of student names, team names, or assignment titles.  Edit the index and show methods to support new tabs and expansion areas in the display.&lt;br /&gt;
|-&lt;br /&gt;
| view_my_scores.html.erb&lt;br /&gt;
| Edit arguments passed and linkage to the new display tabs.&lt;br /&gt;
|-&lt;br /&gt;
| _summary_reviews.html.erb&lt;br /&gt;
| Add more expansion areas to the display to organize the reviews.&lt;br /&gt;
|-&lt;br /&gt;
| _reviewTabs.html.erb&lt;br /&gt;
| Add new display tabs by building on the current test suite in this file.&lt;br /&gt;
|-&lt;br /&gt;
| _searchbox.html.erb&lt;br /&gt;
| Edit linkage to point to the new search method in grades_controller.rb&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
For testing, we built off the existing test framework which implemented RSPEC.  The goal of our testing is to verify that the existing functionality is still present in the new views and is accessible to both the student and the instructor.  Below are the tests that have been modified or created to verify the changed functionality.  Any other tests not listed below are assumed to be unmodified and are intended to still work with the new updates. Note that some requirements of this project cannot be verified with the script such as formatting changes, but any functional modifications to the layout will be verified.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 1&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 2&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 3&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 4&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108562</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108562"/>
		<updated>2017-04-13T04:38:47Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Requirements===&lt;br /&gt;
# There should be a tabbed view to switch between the various review views.&lt;br /&gt;
#* Tab 1: Reviews&lt;br /&gt;
#* Tab 2: Author Feedback&lt;br /&gt;
#* Tab 3: Statistics&lt;br /&gt;
#* Tab 4: Heat grid&lt;br /&gt;
# There should be a way to gray out/hide the criteria (i.e. questions) so that the responses stand out more clearly.&lt;br /&gt;
# There should be a way to search all reviews of particular view which contain a given text string.&lt;br /&gt;
# Whitespace should be reduced on the review headings by including the review number, review round, and last reviewed time on a single line (left, center, and right justified respectively).&lt;br /&gt;
# The &amp;quot;Give feedback for Review #&amp;quot; link should not be visible unless the reivew has been expanded&lt;br /&gt;
# The &amp;quot;Give feedback for Review #&amp;quot; link should be at the top and bottom of the review after the review has been expanded.&lt;br /&gt;
# There should be a separate &amp;quot;Show all reviews&amp;quot; link for each round instead of having a single &amp;quot;Show all reviews&amp;quot; link.&lt;br /&gt;
# There should not be so much space between Round 2 and the Reputation.&lt;br /&gt;
# The unnecessary whitespace between the checkbox questions should be removed.&lt;br /&gt;
# The project should focus on the reduction of redundant code within views, controllers, and models where applicable&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Statistics&lt;br /&gt;
# Heat Grid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heat grid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|-&lt;br /&gt;
| rails-ajax&lt;br /&gt;
| Gem&lt;br /&gt;
| Enable AJAX to refresh containers within views without reloading the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. We will use this pattern to logically segregate our interface from the business logic implementation. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects. We will use this pattern to access the persistent storage in a standard way and to generate object representations of the records.&lt;br /&gt;
&lt;br /&gt;
'''Factory Method''' - A creational software design pattern which allows a class to instantiate objects but defer the creation to subclasses of the parent class. We will use this pattern in various places to generate objects for either students or instructors based on the user's role at the time of instantiation. This will allow us to have a single class to interact with from the controller and views but remain flexible enough to accommodate the needs of the different user types.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Low Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Screen Mockups====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Collapsed Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Collapsed_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Expanded Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Expanded_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Class Diagram====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Files Changed====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! File&lt;br /&gt;
! Changes&lt;br /&gt;
|-&lt;br /&gt;
| grades_controller.rb&lt;br /&gt;
| Add extra methods for filters of student names, team names, or assignment titles.  Edit the index and show methods to support new tabs and expansion areas in the display.&lt;br /&gt;
|-&lt;br /&gt;
| view_my_scores.html.erb&lt;br /&gt;
| Edit arguments passed and linkage to the new display tabs.&lt;br /&gt;
|-&lt;br /&gt;
| _summary_reviews.html.erb&lt;br /&gt;
| Add more expansion areas to the display to organize the reviews.&lt;br /&gt;
|-&lt;br /&gt;
| _reviewTabs.html.erb&lt;br /&gt;
| Add new display tabs by building on the current test suite in this file.&lt;br /&gt;
|-&lt;br /&gt;
| _searchbox.html.erb&lt;br /&gt;
| Edit linkage to point to the new search method in grades_controller.rb&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
For testing, we built off the existing test framework which implemented RSPEC.  The goal of our testing is to verify that the existing functionality is still present in the new views and is accessible to both the student and the instructor.  Below are the tests that have been modified or created to verify the changed functionality.  Any other tests not listed below are assumed to be unmodified and are intended to still work with the new updates. Note that some requirements of this project cannot be verified with the script such as formatting changes, but any functional modifications to the layout will be verified.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 1&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 2&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 3&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 4&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108561</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108561"/>
		<updated>2017-04-13T04:37:49Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: /* Required Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Requirements===&lt;br /&gt;
# There should be a tabbed view to switch between the various review views.&lt;br /&gt;
#* Tab 1: Reviews&lt;br /&gt;
#* Tab 2: Author Feedback&lt;br /&gt;
#* Tab 3: Statistics&lt;br /&gt;
#* Tab 4: Heat grid&lt;br /&gt;
# There should be a way to gray out/hide the criteria (i.e. questions) so that the responses stand out more clearly.&lt;br /&gt;
# There should be a way to search all reviews of particular view which contain a given text string.&lt;br /&gt;
# Whitespace should be reduced on the review headings by including the review number, review round, and last reviewed time on a single line (left, center, and right justified respectively).&lt;br /&gt;
# The &amp;quot;Give feedback for Review #&amp;quot; link should not be visible unless the reivew has been expanded&lt;br /&gt;
# The &amp;quot;Give feedback for Review #&amp;quot; link should be at the top and bottom of the review after the review has been expanded.&lt;br /&gt;
# There should be a separate &amp;quot;Show all reviews&amp;quot; link for each round instead of having a single &amp;quot;Show all reviews&amp;quot; link.&lt;br /&gt;
# There should not be so much space between Round 2 and the Reputation.&lt;br /&gt;
# The unnecessary whitespace between the checkbox questions should be removed.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Statistics&lt;br /&gt;
# Heat Grid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heat grid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|-&lt;br /&gt;
| rails-ajax&lt;br /&gt;
| Gem&lt;br /&gt;
| Enable AJAX to refresh containers within views without reloading the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. We will use this pattern to logically segregate our interface from the business logic implementation. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects. We will use this pattern to access the persistent storage in a standard way and to generate object representations of the records.&lt;br /&gt;
&lt;br /&gt;
'''Factory Method''' - A creational software design pattern which allows a class to instantiate objects but defer the creation to subclasses of the parent class. We will use this pattern in various places to generate objects for either students or instructors based on the user's role at the time of instantiation. This will allow us to have a single class to interact with from the controller and views but remain flexible enough to accommodate the needs of the different user types.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Low Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Screen Mockups====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Collapsed Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Collapsed_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Expanded Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Expanded_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Class Diagram====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Files Changed====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! File&lt;br /&gt;
! Changes&lt;br /&gt;
|-&lt;br /&gt;
| grades_controller.rb&lt;br /&gt;
| Add extra methods for filters of student names, team names, or assignment titles.  Edit the index and show methods to support new tabs and expansion areas in the display.&lt;br /&gt;
|-&lt;br /&gt;
| view_my_scores.html.erb&lt;br /&gt;
| Edit arguments passed and linkage to the new display tabs.&lt;br /&gt;
|-&lt;br /&gt;
| _summary_reviews.html.erb&lt;br /&gt;
| Add more expansion areas to the display to organize the reviews.&lt;br /&gt;
|-&lt;br /&gt;
| _reviewTabs.html.erb&lt;br /&gt;
| Add new display tabs by building on the current test suite in this file.&lt;br /&gt;
|-&lt;br /&gt;
| _searchbox.html.erb&lt;br /&gt;
| Edit linkage to point to the new search method in grades_controller.rb&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
For testing, we built off the existing test framework which implemented RSPEC.  The goal of our testing is to verify that the existing functionality is still present in the new views and is accessible to both the student and the instructor.  Below are the tests that have been modified or created to verify the changed functionality.  Any other tests not listed below are assumed to be unmodified and are intended to still work with the new updates. Note that some requirements of this project cannot be verified with the script such as formatting changes, but any functional modifications to the layout will be verified.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 1&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 2&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 3&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 4&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108557</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108557"/>
		<updated>2017-04-13T04:09:00Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: /* Project Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Statistics&lt;br /&gt;
# Heat Grid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heat grid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|-&lt;br /&gt;
| rails-ajax&lt;br /&gt;
| Gem&lt;br /&gt;
| Enable AJAX to refresh containers within views without reloading the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. We will use this pattern to logically segregate our interface from the business logic implementation. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects. We will use this pattern to access the persistent storage in a standard way and to generate object representations of the records.&lt;br /&gt;
&lt;br /&gt;
'''Factory Method''' - A creational software design pattern which allows a class to instantiate objects but defer the creation to subclasses of the parent class. We will use this pattern in various places to generate objects for either students or instructors based on the user's role at the time of instantiation. This will allow us to have a single class to interact with from the controller and views but remain flexible enough to accommodate the needs of the different user types.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Low Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Screen Mockups====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Collapsed Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Collapsed_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Expanded Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Expanded_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Code Change Specifics====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Class Diagram====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
For testing, we built off the existing test framework which implemented RSPEC.  The goal of our testing is to verify that the existing functionality is still present in the new views and is accessible to both the student and the instructor.  Below are the tests that have been modified or created to verify the changed functionality.  Any other tests not listed below are assumed to be unmodified and are intended to still work with the new updates. Note that some requirements of this project cannot be verified with the script such as formatting changes, but any functional modifications to the layout will be verified.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 1&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 2&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 3&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 4&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108556</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108556"/>
		<updated>2017-04-13T04:08:33Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: /* High Level Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Statistics&lt;br /&gt;
# Heat Grid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heat grid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|-&lt;br /&gt;
| rails-ajax&lt;br /&gt;
| Gem&lt;br /&gt;
| Enable AJAX to refresh containers within views without reloading the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. We will use this pattern to logically segregate our interface from the business logic implementation. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects. We will use this pattern to access the persistent storage in a standard way and to generate object representations of the records.&lt;br /&gt;
&lt;br /&gt;
'''Factory Method''' - A creational software design pattern which allows a class to instantiate objects but defer the creation to subclasses of the parent class. We will use this pattern in various places to generate objects for either students or instructors based on the user's role at the time of instantiation. This will allow us to have a single class to interact with from the controller and views but remain flexible enough to accommodate the needs of the different user types.&lt;br /&gt;
&lt;br /&gt;
===Low Level Design===&lt;br /&gt;
&lt;br /&gt;
====Screen Mockups====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Collapsed Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Collapsed_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Expanded Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Expanded_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Code Change Specifics====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Class Diagram====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
For testing, we built off the existing test framework which implemented RSPEC.  The goal of our testing is to verify that the existing functionality is still present in the new views and is accessible to both the student and the instructor.  Below are the tests that have been modified or created to verify the changed functionality.  Any other tests not listed below are assumed to be unmodified and are intended to still work with the new updates. Note that some requirements of this project cannot be verified with the script such as formatting changes, but any functional modifications to the layout will be verified.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 1&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 2&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 3&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 4&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108554</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108554"/>
		<updated>2017-04-13T04:03:48Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Statistics&lt;br /&gt;
# Heat Grid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heat grid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|-&lt;br /&gt;
| rails-ajax&lt;br /&gt;
| Gem&lt;br /&gt;
| Enable AJAX to refresh containers within views without reloading the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. We will use this pattern to logically segregate our interface from the business logic implementation. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects. We will use this pattern to access the persistent storage in a standard way and to generate object representations of the records.&lt;br /&gt;
&lt;br /&gt;
'''Factory Method''' - A creational software design pattern which allows a class to instantiate objects but defer the creation to subclasses of the parent class. We will use this pattern in various places to generate objects for either students or instructors based on the user's role at the time of instantiation. This will allow us to have a single class to interact with from the controller and views but remain flexible enough to accommodate the needs of the different user types.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Low Level Design===&lt;br /&gt;
&lt;br /&gt;
====Screen Mockups====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Collapsed Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Collapsed_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Expanded Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Expanded_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Code Change Specifics====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Class Diagram====&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
For testing, we built off the existing test framework which implemented RSPEC.  The goal of our testing is to verify that the existing functionality is still present in the new views and is accessible to both the student and the instructor.  Below are the tests that have been modified or created to verify the changed functionality.  Any other tests not listed below are assumed to be unmodified and are intended to still work with the new updates. Note that some requirements of this project cannot be verified with the script such as formatting changes, but any functional modifications to the layout will be verified.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 1&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 2&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 3&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 4&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108553</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108553"/>
		<updated>2017-04-13T03:51:34Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews and scores&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Graphs and Charts&lt;br /&gt;
# Heatgrid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heatgrid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|-&lt;br /&gt;
| rails-ajax&lt;br /&gt;
| Gem&lt;br /&gt;
| Enable AJAX to refresh containers within views without reloading the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects.&lt;br /&gt;
&lt;br /&gt;
===Low Level Design===&lt;br /&gt;
&lt;br /&gt;
====Screen Mockups====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Collapsed Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Collapsed_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Expanded Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Expanded_Tabs_-_35.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
For testing, we built off the existing test framework which implemented RSPEC.  The goal of our testing is to verify that the existing functionality is still present in the new views and is accessible to both the student and the instructor.  Below are the tests that have been modified or created to verify the changed functionality.  Any other tests not listed below are assumed to be unmodified and are intended to still work with the new updates. Note that some requirements of this project cannot be verified with the script such as formatting changes, but any functional modifications to the layout will be verified.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 1&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 2&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for a student&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#Has one course assigned&lt;br /&gt;
#Has one assigned as part of that course&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as a student&lt;br /&gt;
#Click on &amp;quot;Assignments&amp;quot; on the top menu&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#On the &amp;quot;Submit or Review work for Expertiza&amp;quot; screen, click on &amp;quot;Your scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 3&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to hide the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is not present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Test Case 4&lt;br /&gt;
|-&lt;br /&gt;
! Test Type&lt;br /&gt;
| Functional&lt;br /&gt;
|-&lt;br /&gt;
! Scenario&lt;br /&gt;
| Test to see if modifications to the display_as_html function in response.rb order to show the “feedback review” button is correct for an instructor&lt;br /&gt;
|-&lt;br /&gt;
! Pre-Conditions&lt;br /&gt;
| &lt;br /&gt;
Make sure student to test with has the following:&lt;br /&gt;
#At least one assignment exists&lt;br /&gt;
#Has more than one review for that assignment&lt;br /&gt;
|-&lt;br /&gt;
! Description&lt;br /&gt;
| &lt;br /&gt;
#Login to the site as an instructor&lt;br /&gt;
#Click on &amp;quot;Manage&amp;quot; on the top menu&lt;br /&gt;
#Click on “Assignments”&lt;br /&gt;
#Select an assignment from the list&lt;br /&gt;
#Click on &amp;quot;View Scores”&lt;br /&gt;
#On the “Summary Report for assignment” screen, select the “Show Review” button&lt;br /&gt;
#On the &amp;quot;Summary Report for assignment&amp;quot; screen, verify that the &amp;quot;Give feedback for Review 1&amp;quot; button is present&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Expanded_Teams_With_Expanded_Tabs_-_35.png&amp;diff=108552</id>
		<title>File:Expanded Teams With Expanded Tabs - 35.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Expanded_Teams_With_Expanded_Tabs_-_35.png&amp;diff=108552"/>
		<updated>2017-04-13T03:50:32Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Expanded_Teams_With_Collapsed_Tabs_-_35.png&amp;diff=108551</id>
		<title>File:Expanded Teams With Collapsed Tabs - 35.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Expanded_Teams_With_Collapsed_Tabs_-_35.png&amp;diff=108551"/>
		<updated>2017-04-13T03:50:15Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108545</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108545"/>
		<updated>2017-04-13T03:41:57Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews and scores&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Graphs and Charts&lt;br /&gt;
# Heatgrid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heatgrid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|-&lt;br /&gt;
| rails-ajax&lt;br /&gt;
| Gem&lt;br /&gt;
| Enable AJAX to refresh containers within views without reloading the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects.&lt;br /&gt;
&lt;br /&gt;
===Low Level Design===&lt;br /&gt;
&lt;br /&gt;
====Screen Mockups====&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Collapsed Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Collapsed_Tabs_-_45.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Expanded Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Expanded_Tabs_-_85.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
In order to test the functionality of our updates, we will focus on reusing the existing test cases which validate the current views for the score report and the reviews report.  Since the goal is to make the code which generates these views common, the tests will include generation of pages from a student login and instructor login to verify that the common elements are present.  This will also ensure that the underlying code which is used to generate the two views works as expected.  For the sections of the views which differ, such as the displaying of reviewer name, we will write independent test that ensure the correct name is listed based on the logged in user type.&lt;br /&gt;
&lt;br /&gt;
Additionally to explicitly testing our updates, we will update the other tests which rely on the contents of the pages in order to invoke various functionality. An example of this will be the addition of the tabbed views.  The existing tests will be updated in order to account for the transition to the appropriate tab before selecting links as appropriate.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Expanded_Teams_With_Collapsed_Tabs_-_45.png&amp;diff=108541</id>
		<title>File:Expanded Teams With Collapsed Tabs - 45.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Expanded_Teams_With_Collapsed_Tabs_-_45.png&amp;diff=108541"/>
		<updated>2017-04-13T03:40:47Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108537</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108537"/>
		<updated>2017-04-13T03:39:05Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews and scores&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Graphs and Charts&lt;br /&gt;
# Heatgrid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heatgrid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|-&lt;br /&gt;
| rails-ajax&lt;br /&gt;
| Gem&lt;br /&gt;
| Enable AJAX to refresh containers within views without reloading the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects.&lt;br /&gt;
&lt;br /&gt;
===Low Level Design===&lt;br /&gt;
&lt;br /&gt;
====Screen Mockups====&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Collapsed Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Collapsed_Tabs_-_85.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''New Scores Report With Multiple Teams and Expanded Reviews'''&lt;br /&gt;
&lt;br /&gt;
[[File:Expanded_Teams_With_Expanded_Tabs_-_85.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
In order to test the functionality of our updates, we will focus on reusing the existing test cases which validate the current views for the score report and the reviews report.  Since the goal is to make the code which generates these views common, the tests will include generation of pages from a student login and instructor login to verify that the common elements are present.  This will also ensure that the underlying code which is used to generate the two views works as expected.  For the sections of the views which differ, such as the displaying of reviewer name, we will write independent test that ensure the correct name is listed based on the logged in user type.&lt;br /&gt;
&lt;br /&gt;
Additionally to explicitly testing our updates, we will update the other tests which rely on the contents of the pages in order to invoke various functionality. An example of this will be the addition of the tabbed views.  The existing tests will be updated in order to account for the transition to the appropriate tab before selecting links as appropriate.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Expanded_Teams_With_Expanded_Tabs_-_85.png&amp;diff=108534</id>
		<title>File:Expanded Teams With Expanded Tabs - 85.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Expanded_Teams_With_Expanded_Tabs_-_85.png&amp;diff=108534"/>
		<updated>2017-04-13T03:35:29Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Expanded_Teams_With_Collapsed_Tabs_-_85.png&amp;diff=108532</id>
		<title>File:Expanded Teams With Collapsed Tabs - 85.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Expanded_Teams_With_Collapsed_Tabs_-_85.png&amp;diff=108532"/>
		<updated>2017-04-13T03:34:59Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108415</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108415"/>
		<updated>2017-04-13T00:18:51Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews and scores&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Graphs and Charts&lt;br /&gt;
# Heatgrid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heatgrid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|-&lt;br /&gt;
| rails-ajax&lt;br /&gt;
| Gem&lt;br /&gt;
| Enable AJAX to refresh containers within views without reloading the page&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
In order to test the functionality of our updates, we will focus on reusing the existing test cases which validate the current views for the score report and the reviews report.  Since the goal is to make the code which generates these views common, the tests will include generation of pages from a student login and instructor login to verify that the common elements are present.  This will also ensure that the underlying code which is used to generate the two views works as expected.  For the sections of the views which differ, such as the displaying of reviewer name, we will write independent test that ensure the correct name is listed based on the logged in user type.&lt;br /&gt;
&lt;br /&gt;
Additionally to explicitly testing our updates, we will update the other tests which rely on the contents of the pages in order to invoke various functionality. An example of this will be the addition of the tabbed views.  The existing tests will be updated in order to account for the transition to the appropriate tab before selecting links as appropriate.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108291</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108291"/>
		<updated>2017-04-12T03:21:20Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews and scores&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Graphs and Charts&lt;br /&gt;
# Heatgrid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heatgrid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Software Patterns====&lt;br /&gt;
&lt;br /&gt;
'''Model-View-Controller (MVC)''' - MVC is a software architectural pattern which divides an application into three parts which separate the data representation from the interface through which users will access and operate on the data. The main components of this pattern are the:&lt;br /&gt;
* Model - The underlying logical structure of the application's data along with the accesses and operators on the data in the persistent storage medium.&lt;br /&gt;
* View - The user facing representation of the data along with the means for the user to request, operate on, or view the data.&lt;br /&gt;
* Controller - The intermediary layer between the Model and the View which accepts requests from the View, translates that to the Model, receives the Model's response and formats the response to the View.&lt;br /&gt;
&lt;br /&gt;
'''Active Record''' - A software architectural pattern which wraps data from persistent storage, along with the method to operate on the data, in a class or object of a class to be used within an application. It uses the object-relation mapping (ORM) technique to create virtual database objects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
In order to test the functionality of our updates, we will focus on reusing the existing test cases which validate the current views for the score report and the reviews report.  Since the goal is to make the code which generates these views common, the tests will include generation of pages from a student login and instructor login to verify that the common elements are present.  This will also ensure that the underlying code which is used to generate the two views works as expected.  For the sections of the views which differ, such as the displaying of reviewer name, we will write independent test that ensure the correct name is listed based on the logged in user type.&lt;br /&gt;
&lt;br /&gt;
Additionally to explicitly testing our updates, we will update the other tests which rely on the contents of the pages in order to invoke various functionality. An example of this will be the addition of the tabbed views.  The existing tests will be updated in order to account for the transition to the appropriate tab before selecting links as appropriate.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108290</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108290"/>
		<updated>2017-04-12T03:05:12Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
&lt;br /&gt;
====Design Overview====&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews and scores&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Graphs and Charts&lt;br /&gt;
# Heatgrid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heatgrid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
====Technologies Used====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Technology&lt;br /&gt;
! Technology Type&lt;br /&gt;
! Use(s)&lt;br /&gt;
|-&lt;br /&gt;
| Ruby&lt;br /&gt;
| Language&lt;br /&gt;
| Core development of the application's backend system&lt;br /&gt;
|-&lt;br /&gt;
| Rails&lt;br /&gt;
| Framework&lt;br /&gt;
| Implements MVC; CRUD support; Web application support&lt;br /&gt;
|-&lt;br /&gt;
| RSpec (rspec)&lt;br /&gt;
| Gem&lt;br /&gt;
| Enables TDD; supports testing DSL&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.tabs)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of tabbed Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| JQuery (jquery.ui.accordion)&lt;br /&gt;
| Library&lt;br /&gt;
| Enables creation of accordion widgets for Web interfaces&lt;br /&gt;
|-&lt;br /&gt;
| Sass (sass-rails)&lt;br /&gt;
| Gem&lt;br /&gt;
| Sass style sheet pre-processor engine&lt;br /&gt;
|-&lt;br /&gt;
| Cascading Style Sheets (CSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Web page presentation description language&lt;br /&gt;
|-&lt;br /&gt;
| Sassy CSS (SCSS)&lt;br /&gt;
| Language&lt;br /&gt;
| Superset of CSS style sheet language&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
In order to test the functionality of our updates, we will focus on reusing the existing test cases which validate the current views for the score report and the reviews report.  Since the goal is to make the code which generates these views common, the tests will include generation of pages from a student login and instructor login to verify that the common elements are present.  This will also ensure that the underlying code which is used to generate the two views works as expected.  For the sections of the views which differ, such as the displaying of reviewer name, we will write independent test that ensure the correct name is listed based on the logged in user type.&lt;br /&gt;
&lt;br /&gt;
Additionally to explicitly testing our updates, we will update the other tests which rely on the contents of the pages in order to invoke various functionality. An example of this will be the addition of the tabbed views.  The existing tests will be updated in order to account for the transition to the appropriate tab before selecting links as appropriate.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108289</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108289"/>
		<updated>2017-04-12T02:07:07Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process. This effort was undertaken as a final project for the CSC 517 - Object Oriented Design and Development course at North Carolina State University in the spring of 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews and scores&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Graphs and Charts&lt;br /&gt;
# Heatgrid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heatgrid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
In order to test the functionality of our updates, we will focus on reusing the existing test cases which validate the current views for the score report and the reviews report.  Since the goal is to make the code which generates these views common, the tests will include generation of pages from a student login and instructor login to verify that the common elements are present.  This will also ensure that the underlying code which is used to generate the two views works as expected.  For the sections of the views which differ, such as the displaying of reviewer name, we will write independent test that ensure the correct name is listed based on the logged in user type.&lt;br /&gt;
&lt;br /&gt;
Additionally to explicitly testing our updates, we will update the other tests which rely on the contents of the pages in order to invoke various functionality. An example of this will be the addition of the tabbed views.  The existing tests will be updated in order to account for the transition to the appropriate tab before selecting links as appropriate.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108288</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108288"/>
		<updated>2017-04-12T02:04:43Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses. It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews and scores&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Graphs and Charts&lt;br /&gt;
# Heatgrid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heatgrid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
In order to test the functionality of our updates, we will focus on reusing the existing test cases which validate the current views for the score report and the reviews report.  Since the goal is to make the code which generates these views common, the tests will include generation of pages from a student login and instructor login to verify that the common elements are present.  This will also ensure that the underlying code which is used to generate the two views works as expected.  For the sections of the views which differ, such as the displaying of reviewer name, we will write independent test that ensure the correct name is listed based on the logged in user type.&lt;br /&gt;
&lt;br /&gt;
Additionally to explicitly testing our updates, we will update the other tests which rely on the contents of the pages in order to invoke various functionality. An example of this will be the addition of the tabbed views.  The existing tests will be updated in order to account for the transition to the appropriate tab before selecting links as appropriate.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108287</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108287"/>
		<updated>2017-04-12T02:04:09Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses.&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews and scores&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Graphs and Charts&lt;br /&gt;
# Heatgrid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the author feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heatgrid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
In order to test the functionality of our updates, we will focus on reusing the existing test cases which validate the current views for the score report and the reviews report.  Since the goal is to make the code which generates these views common, the tests will include generation of pages from a student login and instructor login to verify that the common elements are present.  This will also ensure that the underlying code which is used to generate the two views works as expected.  For the sections of the views which differ, such as the displaying of reviewer name, we will write independent test that ensure the correct name is listed based on the logged in user type.&lt;br /&gt;
&lt;br /&gt;
Additionally to explicitly testing our updates, we will update the other tests which rely on the contents of the pages in order to invoke various functionality. An example of this will be the addition of the tabbed views.  The existing tests will be updated in order to account for the transition to the appropriate tab before selecting links as appropriate.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108202</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108202"/>
		<updated>2017-04-08T02:22:56Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses.&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&lt;br /&gt;
===High Level Design===&lt;br /&gt;
The project requirements state that we need to create a standard UI for accessing and consuming review and score information. The emphasis will be on smart and purposeful code reuse as well as ease of navigation to access information. To achieve these results we will redesign the scores report to work for both instructors and students alike. There will be a single route, a single controller method, and a single view that is common t users of both role types. In some instances, such as with the graphs and charts, the data will be different enough to warrant separate methods to retrieve the values needed. In most instances, the data is identical and will be accessed identically.&lt;br /&gt;
&lt;br /&gt;
We will create a standard hierarchy which works for both students (who only need to see a single team's scores) and instructors (who need to see all teams' scores). This hierarchy will be rendered within a page in the form of a set of tabbed panes which contain the contents. We will separate the information among four tabs.&lt;br /&gt;
&lt;br /&gt;
# Reviews and scores&lt;br /&gt;
# Author Feedback&lt;br /&gt;
# Graphs and Charts&lt;br /&gt;
# Heatgrid&lt;br /&gt;
&lt;br /&gt;
Putting these components on different tabs will allow us to de-clutter the UI. The instructor scores report UI has multiple ways to expand and collapse sections of information, links are placed in some unusual places, and the page can get so cluttered that it is difficult to distinguish one thing from another. This will be cleaned up by removing some links, removing the authoer feedback and the charts, and placing the reviews and scores into more discernible sections. The graphs and charts will be on their own tab so they can be larger and easier to read. Since they are not confined to a single bar of a fixed height new graphs and charts can be added. The heatgrid will no longer be coupled with the author feedback and there will be a standard author feedback view which encompasses all information needs. Each of these tabs will be rendered using their own partial. &lt;br /&gt;
&lt;br /&gt;
To prevent the application from pulling data for tabs which the user will not view, AJAX calls will be used to access the data on demand without reloading the page. These calls can also be expanded to request data for individual sections. Routes will be created to controller methods specifically to pull the data for each tab so that calls can be made to them to generate the necessary data structures. These will be accessed when a user expands a group or switches tabs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&amp;lt;&amp;lt;Section deatils go here&amp;gt;&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108191</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108191"/>
		<updated>2017-04-08T01:58:27Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses.&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Scores Report====&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
The scores report for students and instructors have very similar layouts despite being created by different controller methods and views. They both display graphs, reviews on team submissions, author feedback, and score metrics. The primary different between them is that the instructor view (shown above) displays information for all teams in a collapsible accordion widget format while the student view (shown below) display the information only for a single team. There are some further discontinuities between the two UIs. For example, the student cannot access the heatgrid view from within the scores report page. This view is only accessible from the assignment page for students. For instructors there are two ways to access the heatgrid view from a single page. The 'Alternate View' link is adjacent to the team name on the heading bar and there is also a link inexplicably placed beneath the 'Final Score' field.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Author Feedback====&lt;br /&gt;
Author feedback takes two different forms when being shown to instructors but only one form for students. Both students and instructors have access to the author feedback format shown on the left in the student view. This format is identical to the format of the review scores and is displayed on the scores report for both instructor and student. The format on the right is shown on the heatgrid view yet it is only available to instructors. The information conveyed by these two formats is nearly identical and not uniformly available to all consumers of this information.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Graphs and Charts====&lt;br /&gt;
The scores report view has a bar of graphs and charts at the top of the page for both students and instructors. Both views shown below use a donut chart and bar graphs though their method of display is not uniform. The instructor view has titles beneath each item but the student view does not. The 'Submitted work' and 'Author Feedback' titles shown, despite being beneath the bar graphs, are actually headings for the metrics which are displayed beneath the graphs. Also, the graphs contain two labels on the y-axis: the maximum score and the average score. The graphs are so compact that the values on the axis overlap and make them illegible.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&amp;lt;&amp;lt;Section deatils go here&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&amp;lt;&amp;lt;Section deatils go here&amp;gt;&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108155</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108155"/>
		<updated>2017-04-08T01:20:06Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses.&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
In the current state, the score report for instructors and students are built differently though they display the same information using similar UI elements. The application has multiple views into the same information but the way in which those views are accessed, the code which populates them, and the layout of the screens differs unnecessarily between instructors and students and across the views themselves. This leads to redundant code in both the backend and frontend of the application. Furthermore, since the UI is not uniform between instructors and students, instructors may have difficulty assisting students in accessing their score information due to the differences which are present in the UI that leads to confusion.&lt;br /&gt;
&lt;br /&gt;
Following are some of the issues with the current state UI which we seek to rectify.&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
Statement 1&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
Statement 2&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
Statement 3&lt;br /&gt;
&lt;br /&gt;
[[File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png]]&lt;br /&gt;
&lt;br /&gt;
Statement 4&lt;br /&gt;
==Project Design==&lt;br /&gt;
&amp;lt;&amp;lt;Section deatils go here&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&amp;lt;&amp;lt;Section deatils go here&amp;gt;&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png&amp;diff=108154</id>
		<title>File:Problem Statement Diagram 3 - Squashed Graphs - 65.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_3_-_Squashed_Graphs_-_65.png&amp;diff=108154"/>
		<updated>2017-04-08T01:16:38Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png&amp;diff=108153</id>
		<title>File:Problem Statement Diagram 2 - Author Feedback - 65.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_2_-_Author_Feedback_-_65.png&amp;diff=108153"/>
		<updated>2017-04-08T01:16:26Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png&amp;diff=108152</id>
		<title>File:Problem Statement Diagram 1B - Student View - 65.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_1B_-_Student_View_-_65.png&amp;diff=108152"/>
		<updated>2017-04-08T01:16:10Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png&amp;diff=108151</id>
		<title>File:Problem Statement Diagram 1A - Instructor View - 65.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_1A_-_Instructor_View_-_65.png&amp;diff=108151"/>
		<updated>2017-04-08T01:15:54Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_3_-_Squashed_Graphs.png&amp;diff=108148</id>
		<title>File:Problem Statement Diagram 3 - Squashed Graphs.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_3_-_Squashed_Graphs.png&amp;diff=108148"/>
		<updated>2017-04-08T01:00:22Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_2_-_Author_Feedback.png&amp;diff=108147</id>
		<title>File:Problem Statement Diagram 2 - Author Feedback.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_2_-_Author_Feedback.png&amp;diff=108147"/>
		<updated>2017-04-08T01:00:12Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_1B_-_Student_View.png&amp;diff=108145</id>
		<title>File:Problem Statement Diagram 1B - Student View.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_1B_-_Student_View.png&amp;diff=108145"/>
		<updated>2017-04-08T00:59:52Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_1A_-_Instructor_View.png&amp;diff=108144</id>
		<title>File:Problem Statement Diagram 1A - Instructor View.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Problem_Statement_Diagram_1A_-_Instructor_View.png&amp;diff=108144"/>
		<updated>2017-04-08T00:58:46Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108131</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=108131"/>
		<updated>2017-04-08T00:08:22Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses.&lt;br /&gt;
&lt;br /&gt;
===Overview of Review Functionality===&lt;br /&gt;
&lt;br /&gt;
The Expertiza review system encompasses many types of reviews. Assignments can have multiple submission rounds defined with their own due dates and criteria. Each round can have an associated questionnaire whereby peers are encouraged, or required, to review each others' submissions and rate those submissions using the scores 1 through 5 for each question. The scores for each question are averaged to find the rating for the submission for each  questionnaire response. The average of all questionnaire responses determine the score for the submission.After the reviews are submitted, the recipient of those reviews can rate the reviewers using a similar questionnaire. On this questionnaire, the author of the submission will rate the reviews based on the reviewers understanding, helpfulness, and respectfulness. This is a review of the reviews, thus it is termed a &amp;quot;metareview.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Both students and instructors using Expertiza have the ability to view the reviews and the scores associated with the reviews for each assignment. These screens will display review summary and detail information in various formats such as lists, graphs, and heatgrids. The instructor will be able to see all review and score information for all teams on the assignment whereas a student will only be able to see the review and score information pertaining to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The reviews and associated scores are available on the scores report. To access the score reports in Expertiza follow these instructions:&lt;br /&gt;
&lt;br /&gt;
'''As a student'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Click on the 'Assignments' link on the top navigation bar.&lt;br /&gt;
# Find the assignment in the list and click the title of the assignment.&lt;br /&gt;
# Click on the 'Your scores' link to see the standard view or click on the 'Alternate View' link to see the heatgrid view.&lt;br /&gt;
&lt;br /&gt;
'''As an instructor'''&lt;br /&gt;
&lt;br /&gt;
# Log into Expertiza.&lt;br /&gt;
# Hover over the 'Manage' item on the top navigation bar, then select click the 'Assignments' link.&lt;br /&gt;
# Find the assignment in the list and click the 'View scores' icon (a star with a magnifying glass) in the 'Actions' column.&lt;br /&gt;
# This will bring up the standard view. To see the heatgrid view, click the 'Alternate View' link on the team headings or click the 'view heatgrid' beneath the 'Final Score' when the team is expanded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a review report, which shows, for each reviewer, all the reviews that (s)he wrote. Currently, the score report and review report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Required Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&amp;lt;&amp;lt;Section deatils go here&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&amp;lt;&amp;lt;Section deatils go here&amp;gt;&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=107965</id>
		<title>E1735. UI changes for review and score reports</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1735._UI_changes_for_review_and_score_reports&amp;diff=107965"/>
		<updated>2017-04-06T23:34:21Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This wiki provides details on the tasks that were undertaken as part of the continuous improvement to the Expertiza project.&lt;br /&gt;
===Background===&lt;br /&gt;
[[Expertiza_documentation|Expertiza]] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation.&lt;br /&gt;
&lt;br /&gt;
The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses.&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process.&lt;br /&gt;
&lt;br /&gt;
===Requirements Statement===&lt;br /&gt;
Expertiza displays reviews (i) to the team who was reviewed, and (ii) to the reviewer.  A student user can see all the reviews of his/her team’s project.  The instructor can see all the reviews of everyone’s project.  The instructor also has access to a Review report, which shows, for each reviewer, all the reviews that (s)he wrote.&lt;br /&gt;
Currently, the score report and reviewer report use completely different code.  This makes the UI non-orthogonal and also causes DRY problems.  So, we would like to have a single way of displaying reviews that would be visible to students (reviews that they did, and reviews that their team received), and instructors (reviews that each time received, sorted by team; and reviews that each student did, sorted by student).&lt;br /&gt;
&lt;br /&gt;
===Tasks===&lt;br /&gt;
The tasks involved as part of this requirements change are as follows:&lt;br /&gt;
# Compact the review display&lt;br /&gt;
#* Eliminate the blank lines between items within a single review. Instead vary the background color from line to line to improve readability&lt;br /&gt;
#* With a single click, there should be a way to hide all the reviews, reveal just the headings (as at present), or expand all the reviews&lt;br /&gt;
# At the top of each review, it should say&lt;br /&gt;
#* Who submitted the review. The instructor should see the user’s name and user-ID.&lt;br /&gt;
#* A student should see&lt;br /&gt;
#** “Reviewer #k”, where k is an integer between 1 and n, the number of reviews that have been submitted for this project&lt;br /&gt;
#** The version number of the review&lt;br /&gt;
#** The time the review was submitted&lt;br /&gt;
# There should be a tabbed view to switch between various review views&lt;br /&gt;
#* One tab has overall statistics (averages, min, max, as the present “normal” view)&lt;br /&gt;
#* One tab has the heat map (current “alternate” view)&lt;br /&gt;
#* One tab has a grid view, with no scores, but text comments in the grid squares, and then a “More” link to display the whole comment (which will require expanding the row of the grid)&lt;br /&gt;
#* Switching between reviews from Reviewer k and Reviewer j might also be done by clicking on different tabs.  Or, it might be more convenient to keep the current score view, which lists the n reviews across the page.  Then the student should be able to click on the reviewer number (the instructor would instead click on the reviewer name) and see the review done by that reviewer&lt;br /&gt;
# To make it easy to focus on the reviewer’s feedback, there should be a way to hide and/or gray the criteria (“questions”), so the responses stand out more clearly&lt;br /&gt;
# There needs to be a way to search all reviews (of a particular project, or by a particular individual) for a given text string.  The user should be able to go from one instance of the text string to another by clicking down and up buttons&lt;br /&gt;
&lt;br /&gt;
==Project Purpose==&lt;br /&gt;
&amp;lt;&amp;lt;Section deatils go here&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Project Design==&lt;br /&gt;
&amp;lt;&amp;lt;Section deatils go here&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&amp;lt;&amp;lt;Section deatils go here&amp;gt;&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107882</id>
		<title>CSC/ECE 517 Spring 2017/oss E1713</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107882"/>
		<updated>2017-04-01T07:19:45Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;E1713. Refactor penalty_helper.rb and late_policies_controller.rb&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This project is intended to improve the code quality and reduce technical debt within the Expertiza system by refactoring the penalty_helper.rb module, refactoring the late_policies_controller.rb controller, and adding test coverage for both files.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
Expertiza is an open source web application which allows an instructor to manage assignments. It has various features viz. creating new assignments, customizing existing assignments, automatically allocating submissions for peer review etc. It has been developed using the [https://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] framework, and the code is available on [https://www.github.com/expertiza/expertiza Github].&lt;br /&gt;
&lt;br /&gt;
===Project Goals===&lt;br /&gt;
In this project, the files [https://github.com/expertiza/expertiza/blob/master/app/controllers/late_policies_controller.rb late_policies_controller.rb] and [https://github.com/expertiza/expertiza/blob/master/app/helpers/penalty_helper.rb penalty_helper.rb] were to be refactored. The methods contained in these files were too long, and needed to be either shortened, or used polymorphically, or deleted altogether if they were not being used. They also were to be refactored semantically if the code did not follow good Ruby coding practices.&lt;br /&gt;
&lt;br /&gt;
==Functionality==&lt;br /&gt;
&lt;br /&gt;
===Late policies and penalties functionality===&lt;br /&gt;
After an instructor creates an assignment in Expertiza they will have the ability to edit the details of the assignment by clicking the Edit action icon beside the assignment. From the &amp;quot;Editing Assignment&amp;quot; screen instructors have the ability to set due dates for each round of an assignment on the &amp;quot;Due dates&amp;quot; tab. On this tab, the instructor can elect to apply a late policy to the assignment by checking the &amp;quot;Apply penalty policy&amp;quot; checkbox and selecting a late policy from the adjacent drop down menu. If no late policies exist, or if the instructor wishes to define a new late policy, then they can click the &amp;quot;New late policy&amp;quot; link to define a new late policy.&lt;br /&gt;
&lt;br /&gt;
An instructor can define a late policy with the following fields:&lt;br /&gt;
&lt;br /&gt;
* Late policy name - This name will show up in the drop down menu on the &amp;quot;Due dates&amp;quot; tab when editing the assignment. It is not enforced to be unique.&lt;br /&gt;
* Penalty Unit - With the options of 'Minute', 'Hour', and 'Day' this field will define the frequency with which penalty points are deducted if an assignment is submitted after a due date.&lt;br /&gt;
* Penalty Point Per Unit - This is the amount of points which will be deducted from the student's score for the assignment round every time the Penalty Unit time has elapsed between the due date and the submission date. [Range: &amp;gt; 50]&lt;br /&gt;
* Maximum Penalty - Points will continue to be deducted from the assignment round score for each Penalty Unit time that has elapsed, but the number of points deducted will not exceed the Maximum Penalty [Range: 1..50]&lt;br /&gt;
&lt;br /&gt;
Once an assignment has a late policy applied to an assignment, students' submissions will be checked against deadlines to determine if the late policy should be enforced. The penalty is applied to the grades under two circumstances. When a student is viewing an assignment task and they click on the &amp;quot;Your scores&amp;quot; link, the applicable penalties will be applied before displaying. Also, when an instructor is viewing the list of assignments on the &amp;quot;Manage content&amp;quot; page, if they click the icon for &amp;quot;View scores&amp;quot; the penalties will be applied to all submissions within the list which were submitted past the due date.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==Change specifics==&lt;br /&gt;
The penalty_helper.rb and late_policies_controller.rb files are central to the creation and maintenance of late policies. Late policies are created by instructors and associated with assignments. The late_policies_controller.rb file is primarily used in the communication with view where late policies are displayed, created, or modified. The penalty_helper.rb file includes many useful methods related to late policies and the penalties which result from their use. For instance, if an assignment is designated as having penalties calculated then when it is graded the PenaltyHelper module will allow the penalties for each assignment to be calculated and applied to the final grade for the assignment. &lt;br /&gt;
&lt;br /&gt;
This effort was initiated with the intent of refactoring some longer methods with redundant subprocedures so that the overall structure of the code is cleaner, concise, and DRYer. This was achieved by performing analysis on the files to identify methods which are not used within the Expertiza code base, methods which are too long, and redundant code which can be extracted from other methods and replaced with a call to a single method.&lt;br /&gt;
&lt;br /&gt;
===Late Policies Controller===&lt;br /&gt;
This is controller class for late policies. It handles all the basic operations on late policies like create/edit/delete policy. The project goal was to refactor the code of create and update methods to make them smaller and more readable. Three helper methods were added in the PenaltyHelper module to make the code shorter. &lt;br /&gt;
There was a common input check in both create and update methods which was separated to write two new methods &amp;quot;check_penalty_points_validity&amp;quot; and &amp;quot;check_policy_with_same_name&amp;quot;, which helped to reuse the code.&lt;br /&gt;
&lt;br /&gt;
  #checking that penalty_per_unit is not exceeding max_penalty&lt;br /&gt;
  def self.check_penalty_points_validity(max_penalty, penalty_per_unit)&lt;br /&gt;
    if max_penalty &amp;lt; penalty_per_unit&lt;br /&gt;
      flash[:error] = &amp;quot;The maximum penalty cannot be less than penalty per unit.&amp;quot;&lt;br /&gt;
      invalid_penalty_per_unit = true&lt;br /&gt;
    else&lt;br /&gt;
      invalid_penalty_per_unit = false&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  #method to check whether the policy name given as a parameter already exists under the current instructor id&lt;br /&gt;
  #it return true if there's another policy with the same name under current instructor else false&lt;br /&gt;
  def self.check_policy_with_same_name(late_policy_name)&lt;br /&gt;
    @policy = LatePolicy.where(policy_name: late_policy_name)&lt;br /&gt;
    if !@policy.nil? &amp;amp;&amp;amp; !@policy.empty?&lt;br /&gt;
      @policy.each do |p|&lt;br /&gt;
        next unless p.instructor_id == instructor_id&lt;br /&gt;
        return true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In case of update action call, there was a part of code which was updating already calculated penalty objects based on the updated late policy. This part was written as a separate method in the helper class with name &amp;quot;update_calculated_penalty_objects&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  #this method updates all the penalty objects which uses the penalty policy which is passed as a parameter&lt;br /&gt;
  #whenever a policy is updated, all the existing penalty objects needs to be updated according to new policy&lt;br /&gt;
  def self.update_calculated_penalty_objects(penalty_policy)&lt;br /&gt;
    @penaltyObjs = CalculatedPenalty.all&lt;br /&gt;
    @penaltyObjs.each do |pen|&lt;br /&gt;
      @participant = AssignmentParticipant.find(pen.participant_id)&lt;br /&gt;
      @assignment = @participant.assignment&lt;br /&gt;
      next unless @assignment.late_policy_id == penalty_policy.id&lt;br /&gt;
      @penalties = calculate_penalty(pen.participant_id)&lt;br /&gt;
      @total_penalty = (@penalties[:submission] + @penalties[:review] + @penalties[:meta_review])&lt;br /&gt;
      if pen.deadline_type_id.to_i == 1&lt;br /&gt;
        {penalty_points: @penalties[:submission]}&lt;br /&gt;
        pen.update_attribute(:penalty_points, @penalties[:submission])&lt;br /&gt;
      elsif pen.deadline_type_id.to_i == 2&lt;br /&gt;
        {penalty_points: @penalties[:review]}&lt;br /&gt;
        pen.update_attribute(:penalty_points, @penalties[:review])&lt;br /&gt;
      elsif pen.deadline_type_id.to_i == 5&lt;br /&gt;
        {penalty_points: @penalties[:meta_review]}&lt;br /&gt;
        pen.update_attribute(:penalty_points, @penalties[:meta_review])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Some variable names were changed in order to make it easier for reader to understand the meaning of code.&lt;br /&gt;
There was some unused commented code which was removed.&lt;br /&gt;
&lt;br /&gt;
===Penalty Helper===&lt;br /&gt;
This is a helper class which contains methods which calculate the different penalties, and are then brought together in one Hash object. The aim was to keep the methods below 25 lines of code if possible. Out of the numerous methods in the file, there were 3 substantial methods, namely calculate_penalty, calculate_submission_penalty, and compute_penalty_on_reviews crossed the 25 line limit.&lt;br /&gt;
&lt;br /&gt;
calculate_penalty is the main method of the PenaltyHelper module. It is called from the [https://github.com/expertiza/expertiza/blob/master/app/controllers/grades_controller.rb GradesController] module. The other methods are called from within the calculate_penalty module. The method mainly contains a few assignment statements, and some method calls. There was no scope for it to be shortened further without risking non-operation of some functionalities.&lt;br /&gt;
&lt;br /&gt;
A particular segment of code converted a time difference into respective unit. This code was inserted into a method with the parameter 'time_difference'. The conversion segment was called in calculate_submission_penalty, as well as compute_penalty_on_reviews. Inserting the conversion logic into a separate method allowed the simplification of both methods.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  def self.calculate_penalty_units(time_difference, penalty_unit)&lt;br /&gt;
    if penalty_unit == 'Minute'&lt;br /&gt;
      penalty_units = time_difference / 60&lt;br /&gt;
    elsif penalty_unit == 'Hour'&lt;br /&gt;
      penalty_units = time_difference / 3600&lt;br /&gt;
    elsif penalty_unit == 'Day'&lt;br /&gt;
      penalty_units = time_difference / 86_400&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
The method was called in two places.&lt;br /&gt;
&lt;br /&gt;
  # Line 44&lt;br /&gt;
  time_difference = last_submission_time - submission_due_date&lt;br /&gt;
  penalty_units = calculate_penalty_units(time_difference, @penalty_unit)&lt;br /&gt;
&lt;br /&gt;
  # Line 109&lt;br /&gt;
  time_difference = review_map_created_at_list.at(i) - review_due_date&lt;br /&gt;
  penalty_units = calculate_penalty_units(time_difference, @penalty_unit)&lt;br /&gt;
&lt;br /&gt;
Apart from the method which was defined, some other methods which were not being called were removed, extraneous statements which were written and then commented were also removed. Also, minor modifications in places where code did not follow Ruby grammar were made, for eg: a space was added between 'if' and the condition statement.&lt;br /&gt;
&lt;br /&gt;
==Test plan==&lt;br /&gt;
The project formerly had no tests associated with these source files. Our refactoring added moved functionality out of the controller and into the helper module, therefore our testing focused on validating the helper methods in penalty_helper.rb.&lt;br /&gt;
&lt;br /&gt;
====Unit tests====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; | Unit Test Summary&lt;br /&gt;
|-&lt;br /&gt;
! Method&lt;br /&gt;
! Parameters&lt;br /&gt;
! Purpose&lt;br /&gt;
! Tested Scenarios&lt;br /&gt;
|-&lt;br /&gt;
| check_policy_with_same_name&lt;br /&gt;
| late_policy_name; instructor_id&lt;br /&gt;
| Check whether a given late policy name exists for the current instructor.&lt;br /&gt;
| 1) Returns true when passed an existing policy name; 2) Returns false when passed a non-existant policy name&lt;br /&gt;
|-&lt;br /&gt;
| check_penalty_points_validity&lt;br /&gt;
| max_penalty; penalty_per_unit&lt;br /&gt;
| Validate that the max penalty and penalty points per unit provided by the user allow at least one unit to pass before reaching the max.&lt;br /&gt;
| 1) Returns true (indicating invalid values) when the penalty points per unit &amp;gt; max penalty; 2) Returns false (indicating valid values) when the penalty points per unit &amp;lt; max penalty; 3) Returns false (indicating valid values) when the penalty points per unit == max penalty&lt;br /&gt;
|-&lt;br /&gt;
| calculate_penalty_units&lt;br /&gt;
| time_difference; penalty_unit&lt;br /&gt;
| Convert a time difference, given in seconds, into the requested penalty unit (i.e. Minutes, Hours, or Days).&lt;br /&gt;
| 1) Returns 1 minute when passed a time difference of 1 minute; 2) Returns 1 hour when passed a time difference of 1 hour; 3) Returns 1 day when passed a time difference of 1 day;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Peer review validation==&lt;br /&gt;
&lt;br /&gt;
===Validating application functionality===&lt;br /&gt;
Instructions on how our reviewers should validate the impacted functionality to ensure that it still works.&lt;br /&gt;
&lt;br /&gt;
===Validating code via RSpec tests===&lt;br /&gt;
&lt;br /&gt;
====Setup Expertiza VCL environment====&lt;br /&gt;
First, setup your Expertiza environment. Navigate to https://vcl.ncsu.edu and click the &amp;quot;Make a Reservation&amp;quot; button. Sign in with your Unity ID. Click the &amp;quot;Reservations&amp;quot; button and then click &amp;quot;New Reservation&amp;quot;. In the environment drop down box select the '	[CSC517, F15] Ruby on Rails / Expertiza' environment, set your session duration, and click the &amp;quot;Create Reservation&amp;quot; button. &lt;br /&gt;
&lt;br /&gt;
One your reservation is ready you should see a Connect! button. Click it and copy the IP address. If you don't have PuTTY then download it. Open PuTTY and paste the IP address in the hostname field and click &amp;quot;Open.&amp;quot; Confirm connection at the security dialog. Log into the server using your Unity ID and password. Once logged in, execute the following commands to setup the Expertiza environment.&lt;br /&gt;
&lt;br /&gt;
   git clone https://github.com/michaelamoran/expertiza.git&lt;br /&gt;
   cd expertiza&lt;br /&gt;
   cp ./config/database.yml.example ./config/database.yml&lt;br /&gt;
   cp ./config/secrets.yml.example ./config/secrets.yml&lt;br /&gt;
   vi ./Gemfile&lt;br /&gt;
   # Search for 'pg' and delete the line and save&lt;br /&gt;
   bundle install&lt;br /&gt;
   rake db:migrate&lt;br /&gt;
   curl https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh | bash&lt;br /&gt;
   source ~/.bash_profile&lt;br /&gt;
   nvm install v7.7.3&lt;br /&gt;
   npm install -g bower&lt;br /&gt;
   bower install&lt;br /&gt;
   &lt;br /&gt;
   # The following commands will prepare the test database so the tests don't fail.&lt;br /&gt;
   rake db:create RAILS_ENV=test&lt;br /&gt;
   rake db:migrate RAILS_ENV=test&lt;br /&gt;
&lt;br /&gt;
====Executing tests====&lt;br /&gt;
&lt;br /&gt;
Now, to run the tests, make sure you are in the project's root directory (i.e. ~/expertiza/). Run the following command:&lt;br /&gt;
&lt;br /&gt;
   rspec spec/helpers/penalty_helper_spec.rb&lt;br /&gt;
&lt;br /&gt;
Once it is complete, the output should contain the number of test cases and how man of them passed or failed.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107880</id>
		<title>CSC/ECE 517 Spring 2017/oss E1713</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107880"/>
		<updated>2017-04-01T06:57:50Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;E1713. Refactor penalty_helper.rb and late_policies_controller.rb&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This project is intended to improve the code quality and reduce technical debt within the Expertiza system by refactoring the penalty_helper.rb module, refactoring the late_policies_controller.rb controller, and adding test coverage for both files.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
Expertiza is an open source web application which allows an instructor to manage assignments. It has various features viz. creating new assignments, customizing existing assignments, automatically allocating submissions for peer review etc. It has been developed using the [https://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] framework, and the code is available on [https://www.github.com/expertiza/expertiza Github].&lt;br /&gt;
&lt;br /&gt;
===Project Goals===&lt;br /&gt;
In this project, the files [https://github.com/expertiza/expertiza/blob/master/app/controllers/late_policies_controller.rb late_policies_controller.rb] and [https://github.com/expertiza/expertiza/blob/master/app/helpers/penalty_helper.rb penalty_helper.rb] were to be refactored. The methods contained in these files were too long, and needed to be either shortened, or used polymorphically, or deleted altogether if they were not being used. They also were to be refactored semantically if the code did not follow good Ruby coding practices.&lt;br /&gt;
&lt;br /&gt;
==Functionality==&lt;br /&gt;
&lt;br /&gt;
===Late policies and penalties functionality===&lt;br /&gt;
After an instructor creates an assignment in Expertiza they will have the ability to edit the details of the assignment by clicking the Edit action icon beside the assignment. From the &amp;quot;Editing Assignment&amp;quot; screen instructors have the ability to set due dates for each round of an assignment on the &amp;quot;Due dates&amp;quot; tab. On this tab, the instructor can elect to apply a late policy to the assignment by checking the &amp;quot;Apply penalty policy&amp;quot; checkbox and selecting a late policy from the adjacent drop down menu. If no late policies exist, or if the instructor wishes to define a new late policy, then they can click the &amp;quot;New late policy&amp;quot; link to define a new late policy.&lt;br /&gt;
&lt;br /&gt;
An instructor can define a late policy with the following fields:&lt;br /&gt;
&lt;br /&gt;
* Late policy name - This name will show up in the drop down menu on the &amp;quot;Due dates&amp;quot; tab when editing the assignment. It is not enforced to be unique.&lt;br /&gt;
* Penalty Unit - With the options of 'Minute', 'Hour', and 'Day' this field will define the frequency with which penalty points are deducted if an assignment is submitted after a due date.&lt;br /&gt;
* Penalty Point Per Unit - This is the amount of points which will be deducted from the student's score for the assignment round every time the Penalty Unit time has elapsed between the due date and the submission date. [Range: &amp;gt; 50]&lt;br /&gt;
* Maximum Penalty - Points will continue to be deducted from the assignment round score for each Penalty Unit time that has elapsed, but the number of points deducted will not exceed the Maximum Penalty [Range: 1..50]&lt;br /&gt;
&lt;br /&gt;
Once an assignment has a late policy applied to an assignment, students' submissions will be checked against deadlines to determine if the late policy should be enforced. The penalty is applied to the grades under two circumstances. When a student is viewing an assignment task and they click on the &amp;quot;Your scores&amp;quot; link, the applicable penalties will be applied before displaying. Also, when an instructor is viewing the list of assignments on the &amp;quot;Manage content&amp;quot; page, if they click the icon for &amp;quot;View scores&amp;quot; the penalties will be applied to all submissions within the list which were submitted past the due date.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==Change specifics==&lt;br /&gt;
The penalty_helper.rb and late_policies_controller.rb files are central to the creation and maintenance of late policies. Late policies are created by instructors and associated with assignments. The late_policies_controller.rb file is primarily used in the communication with view where late policies are displayed, created, or modified. The penalty_helper.rb file includes many useful methods related to late policies and the penalties which result from their use. For instance, if an assignment is designated as having penalties calculated then when it is graded the PenaltyHelper module will allow the penalties for each assignment to be calculated and applied to the final grade for the assignment. &lt;br /&gt;
&lt;br /&gt;
This effort was initiated with the intent of refactoring some longer methods with redundant subprocedures so that the overall structure of the code is cleaner, concise, and DRYer. This was achieved by performing analysis on the files to identify methods which are not used within the Expertiza code base, methods which are too long, and redundant code which can be extracted from other methods and replaced with a call to a single method.&lt;br /&gt;
&lt;br /&gt;
===Late Policies Controller===&lt;br /&gt;
This is controller class for late policies. It handles all the basic operations on late policies like create/edit/delete policy. The project goal was to refactor the code of create and update methods to make them smaller and more readable. Three helper methods were added in the PenaltyHelper module to make the code shorter. &lt;br /&gt;
There was a common input check in both create and update methods which was separated to write two new methods &amp;quot;check_penalty_points_validity&amp;quot; and &amp;quot;check_policy_with_same_name&amp;quot;, which helped to reuse the code.&lt;br /&gt;
&lt;br /&gt;
  #checking that penalty_per_unit is not exceeding max_penalty&lt;br /&gt;
  def self.check_penalty_points_validity(max_penalty, penalty_per_unit)&lt;br /&gt;
    if max_penalty &amp;lt; penalty_per_unit&lt;br /&gt;
      flash[:error] = &amp;quot;The maximum penalty cannot be less than penalty per unit.&amp;quot;&lt;br /&gt;
      invalid_penalty_per_unit = true&lt;br /&gt;
    else&lt;br /&gt;
      invalid_penalty_per_unit = false&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  #method to check whether the policy name given as a parameter already exists under the current instructor id&lt;br /&gt;
  #it return true if there's another policy with the same name under current instructor else false&lt;br /&gt;
  def self.check_policy_with_same_name(late_policy_name)&lt;br /&gt;
    @policy = LatePolicy.where(policy_name: late_policy_name)&lt;br /&gt;
    if !@policy.nil? &amp;amp;&amp;amp; !@policy.empty?&lt;br /&gt;
      @policy.each do |p|&lt;br /&gt;
        next unless p.instructor_id == instructor_id&lt;br /&gt;
        return true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In case of update action call, there was a part of code which was updating already calculated penalty objects based on the updated late policy. This part was written as a separate method in the helper class with name &amp;quot;update_calculated_penalty_objects&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  #this method updates all the penalty objects which uses the penalty policy which is passed as a parameter&lt;br /&gt;
  #whenever a policy is updated, all the existing penalty objects needs to be updated according to new policy&lt;br /&gt;
  def self.update_calculated_penalty_objects(penalty_policy)&lt;br /&gt;
    @penaltyObjs = CalculatedPenalty.all&lt;br /&gt;
    @penaltyObjs.each do |pen|&lt;br /&gt;
      @participant = AssignmentParticipant.find(pen.participant_id)&lt;br /&gt;
      @assignment = @participant.assignment&lt;br /&gt;
      next unless @assignment.late_policy_id == penalty_policy.id&lt;br /&gt;
      @penalties = calculate_penalty(pen.participant_id)&lt;br /&gt;
      @total_penalty = (@penalties[:submission] + @penalties[:review] + @penalties[:meta_review])&lt;br /&gt;
      if pen.deadline_type_id.to_i == 1&lt;br /&gt;
        {penalty_points: @penalties[:submission]}&lt;br /&gt;
        pen.update_attribute(:penalty_points, @penalties[:submission])&lt;br /&gt;
      elsif pen.deadline_type_id.to_i == 2&lt;br /&gt;
        {penalty_points: @penalties[:review]}&lt;br /&gt;
        pen.update_attribute(:penalty_points, @penalties[:review])&lt;br /&gt;
      elsif pen.deadline_type_id.to_i == 5&lt;br /&gt;
        {penalty_points: @penalties[:meta_review]}&lt;br /&gt;
        pen.update_attribute(:penalty_points, @penalties[:meta_review])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Some variable names were changed in order to make it easier for reader to understand the meaning of code.&lt;br /&gt;
There was some unused commented code which was removed.&lt;br /&gt;
&lt;br /&gt;
===Penalty Helper===&lt;br /&gt;
This is a helper class which contains methods which calculate the different penalties, and are then brought together in one Hash object. The aim was to keep the methods below 25 lines of code if possible. Out of the numerous methods in the file, there were 3 substantial methods, namely calculate_penalty, calculate_submission_penalty, and compute_penalty_on_reviews crossed the 25 line limit.&lt;br /&gt;
&lt;br /&gt;
calculate_penalty is the main method of the PenaltyHelper module. It is called from the [https://github.com/expertiza/expertiza/blob/master/app/controllers/grades_controller.rb GradesController] module. The other methods are called from within the calculate_penalty module. The method mainly contains a few assignment statements, and some method calls. There was no scope for it to be shortened further without risking non-operation of some functionalities.&lt;br /&gt;
&lt;br /&gt;
A particular segment of code converted a time difference into respective unit. This code was inserted into a method with the parameter 'time_difference'. The conversion segment was called in calculate_submission_penalty, as well as compute_penalty_on_reviews. Inserting the conversion logic into a separate method allowed the simplification of both methods.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  def self.calculate_penalty_units(time_difference, penalty_unit)&lt;br /&gt;
    if penalty_unit == 'Minute'&lt;br /&gt;
      penalty_units = time_difference / 60&lt;br /&gt;
    elsif penalty_unit == 'Hour'&lt;br /&gt;
      penalty_units = time_difference / 3600&lt;br /&gt;
    elsif penalty_unit == 'Day'&lt;br /&gt;
      penalty_units = time_difference / 86_400&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
The method was called in two places.&lt;br /&gt;
&lt;br /&gt;
  # Line 44&lt;br /&gt;
  time_difference = last_submission_time - submission_due_date&lt;br /&gt;
  penalty_units = calculate_penalty_units(time_difference, @penalty_unit)&lt;br /&gt;
&lt;br /&gt;
  # Line 109&lt;br /&gt;
  time_difference = review_map_created_at_list.at(i) - review_due_date&lt;br /&gt;
  penalty_units = calculate_penalty_units(time_difference, @penalty_unit)&lt;br /&gt;
&lt;br /&gt;
Apart from the method which was defined, some other methods which were not being called were removed, extraneous statements which were written and then commented were also removed. Also, minor modifications in places where code did not follow Ruby grammar were made, for eg: a space was added between 'if' and the condition statement.&lt;br /&gt;
&lt;br /&gt;
===Functional and integration testing===&lt;br /&gt;
Motivation behind testing including the technologies used for testing.&lt;br /&gt;
&lt;br /&gt;
====penalty_helper_spec.rb====&lt;br /&gt;
Specific changes identified and made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
====late_policies_controller_spec.rb====&lt;br /&gt;
Specific changes identified TO BE made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
==Peer review validation==&lt;br /&gt;
&lt;br /&gt;
===Validating application functionality===&lt;br /&gt;
Instructions on how our reviewers should validate the impacted functionality to ensure that it still works.&lt;br /&gt;
&lt;br /&gt;
===Validating code via RSpec tests===&lt;br /&gt;
&lt;br /&gt;
====Setup Expertiza VCL environment====&lt;br /&gt;
First, setup your Expertiza environment. Navigate to https://vcl.ncsu.edu and click the &amp;quot;Make a Reservation&amp;quot; button. Sign in with your Unity ID. Click the &amp;quot;Reservations&amp;quot; button and then click &amp;quot;New Reservation&amp;quot;. In the environment drop down box select the '	[CSC517, F15] Ruby on Rails / Expertiza' environment, set your session duration, and click the &amp;quot;Create Reservation&amp;quot; button. &lt;br /&gt;
&lt;br /&gt;
One your reservation is ready you should see a Connect! button. Click it and copy the IP address. If you don't have PuTTY then download it. Open PuTTY and paste the IP address in the hostname field and click &amp;quot;Open.&amp;quot; Confirm connection at the security dialog. Log into the server using your Unity ID and password. Once logged in, execute the following commands to setup the Expertiza environment.&lt;br /&gt;
&lt;br /&gt;
   git clone https://github.com/michaelamoran/expertiza.git&lt;br /&gt;
   cd expertiza&lt;br /&gt;
   cp ./config/database.yml.example ./config/database.yml&lt;br /&gt;
   cp ./config/secrets.yml.example ./config/secrets.yml&lt;br /&gt;
   vi ./Gemfile&lt;br /&gt;
   # Search for 'pg' and delete the line and save&lt;br /&gt;
   bundle install&lt;br /&gt;
   rake db:migrate&lt;br /&gt;
   curl https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh | bash&lt;br /&gt;
   source ~/.bash_profile&lt;br /&gt;
   nvm install v7.7.3&lt;br /&gt;
   npm install -g bower&lt;br /&gt;
   bower install&lt;br /&gt;
   &lt;br /&gt;
   # The following commands will prepare the test database so the tests don't fail.&lt;br /&gt;
   rake db:create RAILS_ENV=test&lt;br /&gt;
   rake db:migrate RAILS_ENV=test&lt;br /&gt;
&lt;br /&gt;
====Executing tests====&lt;br /&gt;
&lt;br /&gt;
Now, to run the tests, make sure you are in the project's root directory (i.e. ~/expertiza/). Run the following command:&lt;br /&gt;
&lt;br /&gt;
   rspec spec/helpers/penalty_helper_spec.rb&lt;br /&gt;
&lt;br /&gt;
Once it is complete, the output should contain the number of test cases and how man of them passed or failed.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107859</id>
		<title>CSC/ECE 517 Spring 2017/oss E1713</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107859"/>
		<updated>2017-04-01T06:20:50Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;E1713. Refactor penalty_helper.rb and late_policies_controller.rb&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This project is intended to improve the code quality and reduce technical debt within the Expertiza system by refactoring the penalty_helper.rb module, refactoring the late_policies_controller.rb controller, and adding test coverage for both files.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
Expertiza is an open source web application which allows an instructor to manage assignments. It has various features viz. creating new assignments, customizing existing assignments, automatically allocating submissions for peer review etc. It has been developed using the [https://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] framework, and the code is available on [https://www.github.com/expertiza/expertiza Github].&lt;br /&gt;
&lt;br /&gt;
===Project Goals===&lt;br /&gt;
In this project, the files [https://github.com/expertiza/expertiza/blob/master/app/controllers/late_policies_controller.rb late_policies_controller.rb] and [https://github.com/expertiza/expertiza/blob/master/app/helpers/penalty_helper.rb penalty_helper.rb] were to be refactored. The methods contained in these files were too long, and needed to be either shortened, or used polymorphically, or deleted altogether if they were not being used. They also were to be refactored semantically if the code did not follow good Ruby coding practices.&lt;br /&gt;
&lt;br /&gt;
==Functionality==&lt;br /&gt;
&lt;br /&gt;
===Late policies and penalties functionality===&lt;br /&gt;
After an instructor creates an assignment in Expertiza they will have the ability to edit the details of the assignment by clicking the Edit action icon beside the assignment. From the &amp;quot;Editing Assignment&amp;quot; screen instructors have the ability to set due dates for each round of an assignment on the &amp;quot;Due dates&amp;quot; tab. On this tab, the instructor can elect to apply a late policy to the assignment by checking the &amp;quot;Apply penalty policy&amp;quot; checkbox and selecting a late policy from the adjacent drop down menu. If no late policies exist, or if the instructor wishes to define a new late policy, then they can click the &amp;quot;New late policy&amp;quot; link to define a new late policy.&lt;br /&gt;
&lt;br /&gt;
An instructor can define a late policy with the following fields:&lt;br /&gt;
&lt;br /&gt;
* Late policy name - This name will show up in the drop down menu on the &amp;quot;Due dates&amp;quot; tab when editing the assignment. It is not enforced to be unique.&lt;br /&gt;
* Penalty Unit - With the options of 'Minute', 'Hour', and 'Day' this field will define the frequency with which penalty points are deducted if an assignment is submitted after a due date.&lt;br /&gt;
* Penalty Point Per Unit - This is the amount of points which will be deducted from the student's score for the assignment round every time the Penalty Unit time has elapsed between the due date and the submission date. [Range: &amp;gt; 50]&lt;br /&gt;
* Maximum Penalty - Points will continue to be deducted from the assignment round score for each Penalty Unit time that has elapsed, but the number of points deducted will not exceed the Maximum Penalty [Range: 1..50]&lt;br /&gt;
&lt;br /&gt;
Once an assignment has a late policy applied&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==Change specifics==&lt;br /&gt;
The penalty_helper.rb and late_policies_controller.rb files are central to the creation and maintenance of late policies. Late policies are created by instructors and associated with assignments. The late_policies_controller.rb file is primarily used in the communication with view where late policies are displayed, created, or modified. The penalty_helper.rb file includes many useful methods related to late policies and the penalties which result from their use. For instance, if an assignment is designated as having penalties calculated then when it is graded the PenaltyHelper module will allow the penalties for each assignment to be calculated and applied to the final grade for the assignment. &lt;br /&gt;
&lt;br /&gt;
This effort was initiated with the intent of refactoring some longer methods with redundant subprocedures so that the overall structure of the code is cleaner, concise, and DRYer. This was achieved by performing analysis on the files to identify methods which are not used within the Expertiza code base, methods which are too long, and redundant code which can be extracted from other methods and replaced with a call to a single method.&lt;br /&gt;
&lt;br /&gt;
===Late Policies Controller===&lt;br /&gt;
This is controller class for late policies. It handles all the basic operations on late policies like create/edit/delete policy. The project goal was to refactor the code of create and update methods to make them smaller and more readable. Three helper methods were added in the PenaltyHelper module to make the code shorter. &lt;br /&gt;
There was a common input check in both create and update methods which was separated to write two new methods &amp;quot;check_penalty_points_validity&amp;quot; and &amp;quot;check_policy_with_same_name&amp;quot;, which helped to reuse the code.&lt;br /&gt;
&lt;br /&gt;
  #checking that penalty_per_unit is not exceeding max_penalty&lt;br /&gt;
  def self.check_penalty_points_validity(max_penalty, penalty_per_unit)&lt;br /&gt;
    if max_penalty &amp;lt; penalty_per_unit&lt;br /&gt;
      flash[:error] = &amp;quot;The maximum penalty cannot be less than penalty per unit.&amp;quot;&lt;br /&gt;
      invalid_penalty_per_unit = true&lt;br /&gt;
    else&lt;br /&gt;
      invalid_penalty_per_unit = false&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  #method to check whether the policy name given as a parameter already exists under the current instructor id&lt;br /&gt;
  #it return true if there's another policy with the same name under current instructor else false&lt;br /&gt;
  def self.check_policy_with_same_name(late_policy_name)&lt;br /&gt;
    @policy = LatePolicy.where(policy_name: late_policy_name)&lt;br /&gt;
    if !@policy.nil? &amp;amp;&amp;amp; !@policy.empty?&lt;br /&gt;
      @policy.each do |p|&lt;br /&gt;
        next unless p.instructor_id == instructor_id&lt;br /&gt;
        return true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
In case of update action call, there was a part of code which was updating already calculated penalty objects based on the updated late policy. This part was written as a separate method in the helper class with name &amp;quot;update_calculated_penalty_objects&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  #this method updates all the penalty objects which uses the penalty policy which is passed as a parameter&lt;br /&gt;
  #whenever a policy is updated, all the existing penalty objects needs to be updated according to new policy&lt;br /&gt;
  def self.update_calculated_penalty_objects(penalty_policy)&lt;br /&gt;
    @penaltyObjs = CalculatedPenalty.all&lt;br /&gt;
    @penaltyObjs.each do |pen|&lt;br /&gt;
      @participant = AssignmentParticipant.find(pen.participant_id)&lt;br /&gt;
      @assignment = @participant.assignment&lt;br /&gt;
      next unless @assignment.late_policy_id == penalty_policy.id&lt;br /&gt;
      @penalties = calculate_penalty(pen.participant_id)&lt;br /&gt;
      @total_penalty = (@penalties[:submission] + @penalties[:review] + @penalties[:meta_review])&lt;br /&gt;
      if pen.deadline_type_id.to_i == 1&lt;br /&gt;
        {penalty_points: @penalties[:submission]}&lt;br /&gt;
        pen.update_attribute(:penalty_points, @penalties[:submission])&lt;br /&gt;
      elsif pen.deadline_type_id.to_i == 2&lt;br /&gt;
        {penalty_points: @penalties[:review]}&lt;br /&gt;
        pen.update_attribute(:penalty_points, @penalties[:review])&lt;br /&gt;
      elsif pen.deadline_type_id.to_i == 5&lt;br /&gt;
        {penalty_points: @penalties[:meta_review]}&lt;br /&gt;
        pen.update_attribute(:penalty_points, @penalties[:meta_review])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Some variable names were changed in order to make it easier for reader to understand the meaning of code.&lt;br /&gt;
There was some unused commented code which was removed.&lt;br /&gt;
&lt;br /&gt;
===Penalty Helper===&lt;br /&gt;
This is a helper class which contains methods which calculate the different penalties, and are then brought together in one Hash object. The aim was to keep the methods below 25 lines of code if possible. Out of the numerous methods in the file, there were 3 substantial methods, namely calculate_penalty, calculate_submission_penalty, and compute_penalty_on_reviews crossed the 25 line limit.&lt;br /&gt;
&lt;br /&gt;
calculate_penalty is the main method of the PenaltyHelper module. It is called from the [https://github.com/expertiza/expertiza/blob/master/app/controllers/grades_controller.rb GradesController] module. The other methods are called from within the calculate_penalty module. The method mainly contains a few assignment statements, and some method calls. There was no scope for it to be shortened further without risking non-operation of some functionalities.&lt;br /&gt;
&lt;br /&gt;
A particular segment of code converted a time difference into respective unit. This code was inserted into a method with the parameter 'time_difference'. The conversion segment was called in calculate_submission_penalty, as well as compute_penalty_on_reviews. Inserting the conversion logic into a separate method allowed the simplification of both methods.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  def self.calculate_penalty_units(time_difference, penalty_unit)&lt;br /&gt;
    if penalty_unit == 'Minute'&lt;br /&gt;
      penalty_units = time_difference / 60&lt;br /&gt;
    elsif penalty_unit == 'Hour'&lt;br /&gt;
      penalty_units = time_difference / 3600&lt;br /&gt;
    elsif penalty_unit == 'Day'&lt;br /&gt;
      penalty_units = time_difference / 86_400&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
The method was called in two places.&lt;br /&gt;
&lt;br /&gt;
  # Line 44&lt;br /&gt;
  time_difference = last_submission_time - submission_due_date&lt;br /&gt;
  penalty_units = calculate_penalty_units(time_difference, @penalty_unit)&lt;br /&gt;
&lt;br /&gt;
  # Line 109&lt;br /&gt;
  time_difference = review_map_created_at_list.at(i) - review_due_date&lt;br /&gt;
  penalty_units = calculate_penalty_units(time_difference, @penalty_unit)&lt;br /&gt;
&lt;br /&gt;
Apart from the method which was defined, some other methods which were not being called were removed, extraneous statements which were written and then commented were also removed. Also, minor modifications in places where code did not follow Ruby grammar were made, for eg: a space was added between 'if' and the condition statement.&lt;br /&gt;
&lt;br /&gt;
===Functional and integration testing===&lt;br /&gt;
Motivation behind testing including the technologies used for testing.&lt;br /&gt;
&lt;br /&gt;
====penalty_helper_spec.rb====&lt;br /&gt;
Specific changes identified and made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
====late_policies_controller_spec.rb====&lt;br /&gt;
Specific changes identified TO BE made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
==Peer review validation==&lt;br /&gt;
&lt;br /&gt;
===Validating application functionality===&lt;br /&gt;
Instructions on how our reviewers should validate the impacted functionality to ensure that it still works.&lt;br /&gt;
&lt;br /&gt;
===Validating code via RSpec tests===&lt;br /&gt;
&lt;br /&gt;
====Setup Expertiza VCL environment====&lt;br /&gt;
First, setup your Expertiza environment. Navigate to https://vcl.ncsu.edu and click the &amp;quot;Make a Reservation&amp;quot; button. Sign in with your Unity ID. Click the &amp;quot;Reservations&amp;quot; button and then click &amp;quot;New Reservation&amp;quot;. In the environment drop down box select the '	[CSC517, F15] Ruby on Rails / Expertiza' environment, set your session duration, and click the &amp;quot;Create Reservation&amp;quot; button. &lt;br /&gt;
&lt;br /&gt;
One your reservation is ready you should see a Connect! button. Click it and copy the IP address. If you don't have PuTTY then download it. Open PuTTY and paste the IP address in the hostname field and click &amp;quot;Open.&amp;quot; Confirm connection at the security dialog. Log into the server using your Unity ID and password. Once logged in, execute the following commands to setup the Expertiza environment.&lt;br /&gt;
&lt;br /&gt;
   git clone https://github.com/michaelamoran/expertiza.git&lt;br /&gt;
   cd expertiza&lt;br /&gt;
   cp ./config/database.yml.example ./config/database.yml&lt;br /&gt;
   cp ./config/secrets.yml.example ./config/secrets.yml&lt;br /&gt;
   vi ./Gemfile&lt;br /&gt;
   # Search for 'pg' and delete the line and save&lt;br /&gt;
   bundle install&lt;br /&gt;
   rake db:migrate&lt;br /&gt;
   curl https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh | bash&lt;br /&gt;
   source ~/.bash_profile&lt;br /&gt;
   nvm install v7.7.3&lt;br /&gt;
   npm install -g bower&lt;br /&gt;
   bower install&lt;br /&gt;
   &lt;br /&gt;
   # The following commands will prepare the test database so the tests don't fail.&lt;br /&gt;
   rake db:create RAILS_ENV=test&lt;br /&gt;
   rake db:migrate RAILS_ENV=test&lt;br /&gt;
&lt;br /&gt;
====Executing tests====&lt;br /&gt;
&lt;br /&gt;
Now, to run the tests, make sure you are in the project's root directory (i.e. ~/expertiza/). Run the following command:&lt;br /&gt;
&lt;br /&gt;
   rspec spec/helpers/penalty_helper_spec.rb&lt;br /&gt;
&lt;br /&gt;
Once it is complete, the output should contain the number of test cases and how man of them passed or failed.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107388</id>
		<title>CSC/ECE 517 Spring 2017/oss E1713</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107388"/>
		<updated>2017-03-24T02:00:22Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;E1713. Refactor penalty_helper.rb and late_policies_controller.rb&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This project is intended to improve the code quality and reduce technical debt within the Expertiza system by refactoring the penalty_helper.rb module, refactoring the late_policies_controller.rb controller, and adding test coverage for both files.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
Expertiza is an open source web application which allows an instructor to manage assignments. It has various features viz. creating new assignments, customizing existing assignments, automatically allocating submissions for peer review etc. It has been developed using the [[Ruby on Rails|Ruby on Rails]] framework, and the code is available on [https://www.github.com/expertiza/expertiza Github].&lt;br /&gt;
&lt;br /&gt;
===Project Goals===&lt;br /&gt;
In this project, the files [https://github.com/expertiza/expertiza/blob/master/app/controllers/late_policies_controller.rb late_policies_controller.rb] and [https://github.com/expertiza/expertiza/blob/master/app/helpers/penalty_helper.rb penalty_helper.rb] were to be refactored. The methods contained in these files were too long, and needed to be either shortened, or used polymorphically, or deleted altogether if they were not being used. They also were to be refactored semantically if the code did not follow good Ruby coding practices.&lt;br /&gt;
&lt;br /&gt;
===Late policies and penalties functionality===&lt;br /&gt;
After an instructor creates an assignment in Expertiza they will have the ability to edit the details of the assignment by clicking the Edit action icon beside the assignment. From the &amp;quot;Editing Assignment&amp;quot; screen instructors have the ability to set due dates for each round of an assignment on the &amp;quot;Due dates&amp;quot; tab. On this tab, the instructor can elect to apply a late policy to the assignment by checking the &amp;quot;Apply penalty policy&amp;quot; checkbox and selecting a late policy from the adjacent drop down menu. If no late policies exist, or if the instructor wishes to define a new late policy, then they can click the &amp;quot;New late policy&amp;quot; link to define a new late policy.&lt;br /&gt;
&lt;br /&gt;
An instructor can define a late policy with the following fields:&lt;br /&gt;
&lt;br /&gt;
* Late policy name - This name will show up in the drop down menu on the &amp;quot;Due dates&amp;quot; tab when editing the assignment. It is not enforced to be unique.&lt;br /&gt;
* Penalty Unit - With the options of 'Minute', 'Hour', and 'Day' this field will define the frequency with which penalty points are deducted if an assignment is submitted after a due date.&lt;br /&gt;
* Penalty Point Per Unit - This is the amount of points which will be deducted from the student's score for the assignment round every time the Penalty Unit time has elapsed between the due date and the submission date. [Range: &amp;gt; 50]&lt;br /&gt;
* Maximum Penalty - Points will continue to be deducted from the assignment round score for each Penalty Unit time that has elapsed, but the number of points deducted will not exceed the Maximum Penalty [Range: 1..50]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==Change specifics==&lt;br /&gt;
The penalty_helper.rb and late_policies_controller.rb files are central to the creation and maintenance of late policies. Late policies are created by instructors and associated with assignments. The late_policies_controller.rb file is primarily used in the communication with view where late policies are displayed, created, or modified. The penalty_helper.rb file includes many useful methods related to late policies and the penalties which result from their use. For instance, if an assignment is designated as having penalties calculated then when it is graded the PenaltyHelper module will allow the penalties for each assignment to be calculated and applied to the final grade for the assignment. &lt;br /&gt;
&lt;br /&gt;
This effort was initiated with the intent of refactoring some longer methods with redundant subprocedures so that the overall structure of the code is cleaner, concise, and DRYer. This was achieved by performing analysis on the files to identify methods which are not used within the Expertiza code base, methods which are too long, and redundant code which can be extracted from other methods and replaced with a call to a single method.&lt;br /&gt;
&lt;br /&gt;
===late_policies.controller.rb===&lt;br /&gt;
Specific changes identified and made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
===penalty_helper.rb===&lt;br /&gt;
This is a helper class which contains methods which calculate the different penalties, and are then brought together in one Hash object. The aim was to keep the methods below 25 lines of code if possible. Out of the numerous methods in the file, there were 3 substantial methods, namely calculate_penalty, calculate_submission_penalty, and compute_penalty_on_reviews crossed the 25 line limit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Functional and integration testing===&lt;br /&gt;
Motivation behind testing including the technologies used for testing.&lt;br /&gt;
&lt;br /&gt;
====penalty_helper_spec.rb====&lt;br /&gt;
Specific changes identified and made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
====late_policies_controller_spec.rb====&lt;br /&gt;
Specific changes identified TO BE made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
==Peer review validation==&lt;br /&gt;
&lt;br /&gt;
===Validating application functionality===&lt;br /&gt;
Instructions on how our reviewers should validate the impacted functionality to ensure that it still works.&lt;br /&gt;
&lt;br /&gt;
===Validating code via RSpec tests===&lt;br /&gt;
&lt;br /&gt;
====Setup Expertiza VCL environment====&lt;br /&gt;
First, setup your Expertiza environment. Navigate to https://vcl.ncsu.edu and click the &amp;quot;Make a Reservation&amp;quot; button. Sign in with your Unity ID. Click the &amp;quot;Reservations&amp;quot; button and then click &amp;quot;New Reservation&amp;quot;. In the environment drop down box select the '	[CSC517, F15] Ruby on Rails / Expertiza' environment, set your session duration, and click the &amp;quot;Create Reservation&amp;quot; button. &lt;br /&gt;
&lt;br /&gt;
One your reservation is ready you should see a Connect! button. Click it and copy the IP address. If you don't have PuTTY then download it. Open PuTTY and paste the IP address in the hostname field and click &amp;quot;Open.&amp;quot; Confirm connection at the security dialog. Log into the server using your Unity ID and password. Once logged in, execute the following commands to setup the Expertiza environment.&lt;br /&gt;
&lt;br /&gt;
   git clone https://github.com/michaelamoran/expertiza.git&lt;br /&gt;
   cd expertiza&lt;br /&gt;
   cp ./config/database.yml.example ./config/database.yml&lt;br /&gt;
   cp ./config/secrets.yml.example ./config/secrets.yml&lt;br /&gt;
   vi ./Gemfile&lt;br /&gt;
   # Search for 'pg' and delete the line and save&lt;br /&gt;
   bundle install&lt;br /&gt;
   rake db:migrate&lt;br /&gt;
   curl https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh | bash&lt;br /&gt;
   source ~/.bash_profile&lt;br /&gt;
   nvm install v7.7.3&lt;br /&gt;
   npm install -g bower&lt;br /&gt;
   bower install&lt;br /&gt;
   &lt;br /&gt;
   # The following commands will prepare the test database so the tests don't fail.&lt;br /&gt;
   rake db:create RAILS_ENV=test&lt;br /&gt;
   rake db:migrate RAILS_ENV=test&lt;br /&gt;
&lt;br /&gt;
====Executing tests====&lt;br /&gt;
&lt;br /&gt;
Now, to run the tests, make sure you are in the project's root directory (i.e. ~/expertiza/). Run the following command:&lt;br /&gt;
&lt;br /&gt;
   rspec spec/helpers/penalty_helper_spec.rb&lt;br /&gt;
&lt;br /&gt;
Once it is complete, the output should contain the number of test cases and how man of them passed or failed.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107387</id>
		<title>CSC/ECE 517 Spring 2017/oss E1713</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107387"/>
		<updated>2017-03-24T01:54:05Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;E1713. Refactor penalty_helper.rb and late_policies_controller.rb&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This project is intended to improve the code quality and reduce technical debt within the Expertiza system by refactoring the penalty_helper.rb module, refactoring the late_policies_controller.rb controller, and adding test coverage for both files.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
Expertiza is an open source web application which allows an instructor to manage assignments. It has various features viz. creating new assignments, customizing existing assignments, automatically allocating submissions for peer review etc. It has been developed using the [[Ruby on Rails|Ruby on Rails]] framework, and the code is available on [https://www.github.com/expertiza/expertiza Github].&lt;br /&gt;
&lt;br /&gt;
===Project Goals===&lt;br /&gt;
In this project, the files [https://github.com/expertiza/expertiza/blob/master/app/controllers/late_policies_controller.rb late_policies_controller.rb] and [https://github.com/expertiza/expertiza/blob/master/app/helpers/penalty_helper.rb penalty_helper.rb] were to be refactored. The methods contained in these files were too long, and needed to be either shortened, or used polymorphically, or deleted altogether if they were not being used. They also were to be refactored semantically if the code did not follow good Ruby coding practices.&lt;br /&gt;
&lt;br /&gt;
===Late policies and penalties functionality===&lt;br /&gt;
After an instructor creates an assignment in Expertiza they will have the ability to edit the details of the assignment by clicking the Edit action icon beside the assignment. From the &amp;quot;Editing Assignment&amp;quot; screen instructors have the ability to set due dates for each round of an assignment on the &amp;quot;Due dates&amp;quot; tab. On this tab, the instructor can elect to apply a late policy to the assignment by checking the &amp;quot;Apply penalty policy&amp;quot; checkbox and selecting a late policy from the adjacent drop down menu. If no late policies exist, or if the instructor wishes to define a new late policy, then they can click the &amp;quot;New late policy&amp;quot; link to define a new late policy.&lt;br /&gt;
&lt;br /&gt;
An instructor can define a late policy with the following fields:&lt;br /&gt;
&lt;br /&gt;
* Late policy name - This name will show up in the drop down menu on the &amp;quot;Due dates&amp;quot; tab when editing the assignment. It is not enforced to be unique.&lt;br /&gt;
* Penalty Unit - With the options of 'Minute', 'Hour', and 'Day' this field will define the frequency with which penalty points are deducted if an assignment is submitted after a due date.&lt;br /&gt;
* Penalty Point Per Unit - This is the amount of points which will be deducted from the student's score for the assignment round every time the Penalty Unit time has elapsed between the due date and the submission date. [Range: &amp;gt; 50]&lt;br /&gt;
* Maximum Penalty - Points will continue to be deducted from the assignment round score for each Penalty Unit time that has elapsed, but the number of points deducted will not exceed the Maximum Penalty [Range: 1..50]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==Change specifics==&lt;br /&gt;
The penalty_helper.rb and late_policies_controller.rb files are central to the creation and maintenance of late policies. Late policies are created by instructors and associated with assignments. The late_policies_controller.rb file is primarily used in the communication with view where late policies are displayed, created, or modified. The penalty_helper.rb file includes many useful methods related to late policies and the penalties which result from their use. For instance, if an assignment is designated as having penalties calculated then when it is graded the PenaltyHelper module will allow the penalties for each assignment to be calculated and applied to the final grade for the assignment. &lt;br /&gt;
&lt;br /&gt;
This effort was initiated with the intent of refactoring some longer methods with redundant subprocedures so that the overall structure of the code is cleaner, concise, and DRYer. This was achieved by performing analysis on the files to identify methods which are not used within the Expertiza code base, methods which are too long, and redundant code which can be extracted from other methods and replaced with a call to a single method.&lt;br /&gt;
&lt;br /&gt;
===late_policies.controller.rb===&lt;br /&gt;
Specific changes identified and made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
===penalty_helper.rb===&lt;br /&gt;
This is a helper class which contains methods which calculate the different penalties, and are then brought together in one Hash object. The aim was to keep the methods below 25 lines of code if possible. Out of the numerous methods in the file, there were 3 substantial methods, namely calculate_penalty, calculate_submission_penalty, and compute_penalty_on_reviews crossed the 25 line limit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Functional and integration testing===&lt;br /&gt;
Motivation behind testing including the technologies used for testing.&lt;br /&gt;
&lt;br /&gt;
====penalty_helper_spec.rb====&lt;br /&gt;
Specific changes identified and made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
====late_policies_controller_spec.rb====&lt;br /&gt;
Specific changes identified TO BE made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
==Peer review validation==&lt;br /&gt;
Instructions on how our reviewers should validate the impacted functionality to ensure that it still works.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107384</id>
		<title>CSC/ECE 517 Spring 2017/oss E1713</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107384"/>
		<updated>2017-03-24T01:50:08Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;E1713. Refactor penalty_helper.rb and late_policies_controller.rb&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This project is intended to improve the code quality and reduce technical debt within the Expertiza system by refactoring the penalty_helper.rb module, refactoring the late_policies_controller.rb controller, and adding test coverage for both files.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
Expertiza is an open source web application which allows an instructor to manage assignments. It has various features viz. creating new assignments, customizing existing assignments, automatically allocating submissions for peer review etc. It has been developed using the [[Ruby on Rails|Ruby on Rails]] framework, and the code is available on [https://www.github.com/expertiza/expertiza Github].&lt;br /&gt;
&lt;br /&gt;
===Project Goals===&lt;br /&gt;
In this project, the files [https://github.com/expertiza/expertiza/blob/master/app/controllers/late_policies_controller.rb late_policies_controller.rb] and [https://github.com/expertiza/expertiza/blob/master/app/helpers/penalty_helper.rb penalty_helper.rb] were to be refactored. The methods contained in these files were too long, and needed to be either shortened, or used polymorphically, or deleted altogether if they were not being used. They also were to be refactored semantically if the code did not follow good Ruby coding practices.&lt;br /&gt;
&lt;br /&gt;
===Late policies and penalties functionality===&lt;br /&gt;
After an instructor creates an assignment in Expertiza they will have the ability to edit the details of the assignment by clicking the Edit action icon beside the assignment. From the &amp;quot;Editing Assignment&amp;quot; screen instructors have the ability to set due dates for each round of an assignment on the &amp;quot;Due dates&amp;quot; tab. On this tab, the instructor can elect to apply a late policy to the assignment by checking the &amp;quot;Apply penalty policy&amp;quot; checkbox and selecting a late policy from the adjacent drop down menu. If no late policies exist, or if the instructor wishes to define a new late policy, then they can click the &amp;quot;New late policy&amp;quot; link to define a new late policy.&lt;br /&gt;
&lt;br /&gt;
An instructor can define a late policy with the following fields:&lt;br /&gt;
Late policy name - This name will show up in the drop down menu on the &amp;quot;Due dates&amp;quot; tab when editing the assignment. It is not enforced to be unique.&lt;br /&gt;
Penalty Unit - With the options of 'Minute', 'Hour', and 'Day' this field will define the frequency with which penalty points are deducted if an assignment is submitted after a due date.&lt;br /&gt;
Penalty Point Per Unit - This is the amount of points which will be deducted from the student's score for the assignment round every time the Penalty Unit time has elapsed between the due date and the submission date. [Range: &amp;gt; 50]&lt;br /&gt;
Maximum Penalty - Points will continue to be deducted from the assignment round score for each Penalty Unit time that has elapsed, but the number of points deducted will not exceed the Maximum Penalty [Range: 1..50]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==Change specifics==&lt;br /&gt;
The penalty_helper.rb and late_policies_controller.rb files are central to the creation and maintenance of late policies. Late policies are created by instructors and associated with assignments. The late_policies_controller.rb file is primarily used in the communication with view where late policies are displayed, created, or modified. The penalty_helper.rb file includes many useful methods related to late policies and the penalties which result from their use. For instance, if an assignment is designated as having penalties calculated then when it is graded the PenaltyHelper module will allow the penalties for each assignment to be calculated and applied to the final grade for the assignment. &lt;br /&gt;
&lt;br /&gt;
This effort was initiated with the intent of refactoring some longer methods with redundant subprocedures so that the overall structure of the code is cleaner, concise, and DRYer. This was achieved by performing analysis on the files to identify methods which are not used within the Expertiza code base, methods which are too long, and redundant code which can be extracted from other methods and replaced with a call to a single method.&lt;br /&gt;
&lt;br /&gt;
===late_policies.controller.rb===&lt;br /&gt;
Specific changes identified and made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
===penalty_helper.rb===&lt;br /&gt;
This is a helper class which contains methods which calculate the different penalties, and are then brought together in one Hash object. The aim was to keep the methods below 25 lines of code if possible. Out of the numerous methods in the file, there were 3 substantial methods, namely calculate_penalty, calculate_submission_penalty, and compute_penalty_on_reviews crossed the 25 line limit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Functional and integration testing===&lt;br /&gt;
Motivation behind testing including the technologies used for testing.&lt;br /&gt;
&lt;br /&gt;
====penalty_helper_spec.rb====&lt;br /&gt;
Specific changes identified and made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
====late_policies_controller_spec.rb====&lt;br /&gt;
Specific changes identified TO BE made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
==Peer review validation==&lt;br /&gt;
Instructions on how our reviewers should validate the impacted functionality to ensure that it still works.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107033</id>
		<title>CSC/ECE 517 Spring 2017/oss E1713</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2017/oss_E1713&amp;diff=107033"/>
		<updated>2017-03-22T17:09:09Z</updated>

		<summary type="html">&lt;p&gt;Mamoran: Created page with &amp;quot;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;E1713. Refactor penalty_helper.rb and late_policies_controller.rb&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt; This project is intended to improve the code quality and reduce technical debt within ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;E1713. Refactor penalty_helper.rb and late_policies_controller.rb&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This project is intended to improve the code quality and reduce technical debt within the Expertiza system by refactoring the penalty_helper.rb module, refactoring the late_policies_controller.rb controller, and adding test coverage for both files.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
Description of Expertiza.&lt;br /&gt;
&lt;br /&gt;
===Late policies and penalties functionality===&lt;br /&gt;
Explanation about the functionality impacted by our files.&lt;br /&gt;
&lt;br /&gt;
==Change specifics==&lt;br /&gt;
Overview of the goal of our changes (out of the Google Doc and from our session with Dr. Gehringer).&lt;br /&gt;
&lt;br /&gt;
===late_policies.controller.rb===&lt;br /&gt;
Specific changes identified and made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
===penalty_helper.rb===&lt;br /&gt;
Specific changes identified and made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
===Functional and integration testing===&lt;br /&gt;
Motivation behind testing including the technologies used for testing.&lt;br /&gt;
&lt;br /&gt;
====penalty_helper_spec.rb====&lt;br /&gt;
Specific changes identified and made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
====late_policies_controller_spec.rb====&lt;br /&gt;
Specific changes identified TO BE made here, including the motivation behind making those changes.&lt;br /&gt;
&lt;br /&gt;
==Peer review validation==&lt;br /&gt;
Instructions on how our reviewers should validate the impacted functionality to ensure that it still works.&lt;/div&gt;</summary>
		<author><name>Mamoran</name></author>
	</entry>
</feed>