<?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=Sgetahu</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=Sgetahu"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Sgetahu"/>
	<updated>2026-05-07T02:28:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160838</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160838"/>
		<updated>2024-12-05T23:55:28Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* ReviewTable.test.tsx */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible and Actual Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of statistics table: &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
The statistics table that encompasses the &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes. The changes are highlighted below.&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make it easier to read and understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
The two proposed changes highlighted above were combined to create a new statistics table. Each of the 2 proposed changes introduces good mechanisms for achieving clarity and delivering a visually appealing statistics table to the user. Below is a snapshot of the new statistics table. Notice how easy it is to read and follow the details in the table as opposed to the original table.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/Statistics.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statisticstsx Statistics.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 2. Change the Location and Format of Team Member List === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
The team member list is a type of information that should be readily available to the user. Instead, it is placed almost at the bottom of the page. Also, the font size is really small which makes it difficult to locate and read. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the &amp;quot;RoundSelector.tsx&amp;quot; file contains a function and its main purpose is to select the review round. However, its function is also to display the team member list. This violates the single responsibility principle. To fix this issue and allow the &amp;quot;RoundSelector&amp;quot; function to perform one function only, which in this case is to select the review round, it would be wise to move the code to gather and display the team information elsewhere — most likely inside the ReviewTable.tsx file.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of where the team member list is located in the UI. The team member list is outlined in red for visibility:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Notice how small the font size is. Also, the team list should be located at the beginning of the page because it is part of the basic information that should be rendered first.&lt;br /&gt;
&lt;br /&gt;
The current code to gather and display the team member list is located inside the &amp;quot;RoundSelector.tsx&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3b.png|450px]]&lt;br /&gt;
&lt;br /&gt;
Our goal is to change the location of the code snippets that are outlined in red to another location. This change will allow the RoundSelector function to only focus on selecting the review &amp;quot;Rounds&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Place the team list at the top of the page '''  &lt;br /&gt;
The possible location of the team list will be in between the &amp;quot;Team&amp;quot; and &amp;quot;Average peer review score&amp;quot; information. The text format will also be changed. A larger text size will be introduced. These changes will allow the user to locate the list of the names of his/her team.&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Change the location of the code that gathers and displays the team list elsewhere '''&lt;br /&gt;
Changing the location of the code from the &amp;quot;RoundSelector.tsx&amp;quot; file to the &amp;quot;ReviewTable.tsx&amp;quot; file would allow us to fix the violation of the single responsibility principle in &amp;quot;RoundSelector.tsx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
Below is a screenshot of the new location of the team member list outlined in red for visibility. Notice that the team member list is easy to locate as well as easy to read. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Also, we changed the code to gather and display the team member list in the &amp;quot;ReviewTable.tsx&amp;quot; file. The new code snippets added are outlined in red for visibility&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3d.png]]&lt;br /&gt;
&lt;br /&gt;
The new &amp;quot;RoundSelector.tsx&amp;quot; contains the function that is ONLY focussed on selecting the review &amp;quot;Round&amp;quot; and thus obeys the single responsibility principle. A snapshot of the new function is provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3e.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/RoundSelector.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/RoundSelelctor.tsx RoundSelector.tsx]&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.tsx ReviewTable.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 3.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Export buttons for CSV and Excel are located below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Utilizes the SheetJS (xlsx) library to generate exportable files. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. File structure matches the table's visible data. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const exportTableData = (format: &amp;quot;csv&amp;quot; | &amp;quot;xlsx&amp;quot;) =&amp;gt; {&lt;br /&gt;
    const tableData = initialData.map((row) =&amp;gt; {&lt;br /&gt;
        const rowData: Record&amp;lt;string, any&amp;gt; = {};&lt;br /&gt;
        columns.forEach((col) =&amp;gt; {&lt;br /&gt;
            const accessor = col.id; // Use column `id` for keys&lt;br /&gt;
            if (accessor) {&lt;br /&gt;
                rowData[accessor] = row[accessor];&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
        return rowData;&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    const worksheet = XLSX.utils.json_to_sheet(tableData);&lt;br /&gt;
    const workbook = XLSX.utils.book_new();&lt;br /&gt;
    XLSX.utils.book_append_sheet(workbook, worksheet, &amp;quot;TableData&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    const fileType = format === &amp;quot;csv&amp;quot; ? &amp;quot;csv&amp;quot; : &amp;quot;xlsx&amp;quot;;&lt;br /&gt;
    XLSX.writeFile(workbook, `table_data.${fileType}`);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Export Buttons in the UI:'''&lt;br /&gt;
&amp;lt;div style={{ marginTop: &amp;quot;10px&amp;quot; }}&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;csv&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary me-2&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to CSV&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;xlsx&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to Excel&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing:'''&lt;br /&gt;
it(&amp;quot;renders export buttons&amp;quot;, () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Table data={mockData} columns={mockColumns} /&amp;gt;);&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to CSV&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to Excel&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
=== 4.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const [lastUpdated, setLastUpdated] = useState&amp;lt;Date | null&amp;gt;(null);&lt;br /&gt;
&lt;br /&gt;
const refreshTableData = () =&amp;gt; {&lt;br /&gt;
    setLastUpdated(new Date());&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
=== 5.Extending toggle options === &lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
While the heat map provides a great visual representation of the users feedback, with the addition of some 'toggles' we can better idea of the different values. Currently, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: old_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
In this current mode, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_opened.png|650px]]&lt;br /&gt;
&lt;br /&gt;
In the updated version, since more toggle options were added, there is now a heat map option menu, that can be opened and closed. When open, there are 4 different checkboxes to check from that each provide their own way of helping the student better analyze their team grade. When the checkbox are checked, it will add a column to the heat map for the corresponding criteria.&lt;br /&gt;
&lt;br /&gt;
When menu is closed:&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_closed.png|300px]]&lt;br /&gt;
&lt;br /&gt;
==== Supporting Code for Toggle Options ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
Here is the supporting code for the 3 new toggle options, showToggle10WordComments, showToggle20WordComments, and showToggleCustomWordComment are all boolean values that if their state is set to true filter and count reviews based on the properties of their comments. When they're set to true, it will first ensure that the comments are defined as strings and not undefined (since a user can leave a review without providing a comment), it will then filter over the reviews array within a row and filter and return the total number of comments that meet the respective criteria.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' Custom Feature Toggle '''&lt;br /&gt;
&lt;br /&gt;
[[File: simon_custom_checkbox_clicked.png|500px]]&lt;br /&gt;
&lt;br /&gt;
In the Heat Map Option panel, there is a custom checkbox, that when clicked, will allow the users to use the arrow to search within the comments to see how many are &amp;gt;= the input value.&lt;br /&gt;
&lt;br /&gt;
==== Supporting Code ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
In the panel, when the checkbox is clicked, it will update the state for showToggleCustomWordComment to be true, which will then render what can be seen in the previous screenshot. When using the input element, since you can use your keyboard to delete the value and type it in, when you delete the value, when it makes the onChange callback, the current empty string will be based to the inputValue set state giving it a NaN value, so if the onChange is an empty string it will set the value back to 0, which is what the confirmInputValue function is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTableRow.tsx&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* src/pages/ViewTeamGrades/App.tsx&lt;br /&gt;
* src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagram ==&lt;br /&gt;
&lt;br /&gt;
The use case diagram for the &amp;quot;view-team-grades&amp;quot; page after clicking &amp;quot;Grades View&amp;quot; in Expertiza highlights various interactions with the UI. Here's a general outline of possible actors and use cases:&lt;br /&gt;
&lt;br /&gt;
=== Actors: ===&lt;br /&gt;
&lt;br /&gt;
* Student - Primarily interacts with the UI to view all the grading details for an assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases: ===&lt;br /&gt;
 &lt;br /&gt;
* View detailed grade of a particular assignment - Including assignment name, team name, average score, etc.&lt;br /&gt;
* Show Submission - This link redirects the student to a new page where the student can see his/her submission details.&lt;br /&gt;
* Show Stats - This link redirects the student to a new page where the student can see grading statistics.&lt;br /&gt;
* Submitted Work - This table shows the average and range of submitted work grades. &lt;br /&gt;
**Show Reviews - This link located in the &amp;quot;Submitted Work&amp;quot; table redirects the student to the page that renders all the reviews that the student obtained from his/her peers.&lt;br /&gt;
* Author Feedback - This table shows the average and range of author feedback for the submitted work. &lt;br /&gt;
**Show Author Feedback - This link located in the &amp;quot;Author Feedback&amp;quot; table redirects the student to the page that renders the author feedback that the student obtained after writing a review.&lt;br /&gt;
* Teammate Review - This table shows the average and range of teammate reviews for the submitted work.&lt;br /&gt;
* Back - Link that enables the student to go back to the main page&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[File: yusufov_d2.png |750px|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
To validate the newly designed &amp;quot;View Submissions&amp;quot; page's functionality, usability, and performance while meeting the goals of clarity, consistency, flexibility, and intuitivenes. &lt;br /&gt;
&lt;br /&gt;
=== Testing Scope ===&lt;br /&gt;
1. Component Validation&lt;br /&gt;
* Test individual React components like ReviewTable.tsx and Statistics.tsx.&lt;br /&gt;
2. API Integration&lt;br /&gt;
* Verify API calls using useAPI.ts to ensure seamless backend integration.&lt;br /&gt;
3. Dynamic Features&lt;br /&gt;
* Test real-time updates (e.g., &amp;quot;Last Updated&amp;quot; timestamps).&lt;br /&gt;
&lt;br /&gt;
=== Test Cases: ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Test Case ID&lt;br /&gt;
! Test Description&lt;br /&gt;
! Expected Outcome&lt;br /&gt;
! Priority&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
| TC001&lt;br /&gt;
| Verify assignment name display&lt;br /&gt;
| Assignment names appear accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC002&lt;br /&gt;
| Validate &amp;quot;Show Stats&amp;quot; link&lt;br /&gt;
| Redirects to accurate grading statistics page.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC003&lt;br /&gt;
| Test pagination in tables&lt;br /&gt;
| Pagination works correctly for large datasets.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC004&lt;br /&gt;
| Test table export functionality&lt;br /&gt;
| CSV and Excel files match table content accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC005&lt;br /&gt;
| Validate data rendering&lt;br /&gt;
| Tables display data using mock files like `dummyData.json`.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC006&lt;br /&gt;
| Test error handling for missing data&lt;br /&gt;
| UI displays appropriate placeholders or messages for empty datasets.&lt;br /&gt;
| Low&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC007&lt;br /&gt;
| Verify contributor details&lt;br /&gt;
| Names and user IDs are displayed accurately.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC008&lt;br /&gt;
| Validate new thresholds for review length&lt;br /&gt;
| Dynamic thresholds for word/character counts update and display correctly.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
&lt;br /&gt;
Unit Testing:&lt;br /&gt;
*Write tests for individual components like ReviewTable using Jest.&lt;br /&gt;
*Validate utility functions in utils.ts.&lt;br /&gt;
&lt;br /&gt;
Integration Testing:&lt;br /&gt;
* Test the interaction between App.tsx and its child components.&lt;br /&gt;
* Validate API responses using axios_client.ts.&lt;br /&gt;
&lt;br /&gt;
Performance Testing:&lt;br /&gt;
* Simulate exporting large datasets to assess system performance.&lt;br /&gt;
* Measure response times for table rendering with dummyData.json.&lt;br /&gt;
&lt;br /&gt;
Accessibility Testing:&lt;br /&gt;
*Test keyboard navigation and WCAG 2.1 compliance.&lt;br /&gt;
&lt;br /&gt;
== Actual Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for ReviewTable using Jest === &lt;br /&gt;
&lt;br /&gt;
*The ReviewTable component is validated using the Jest and React Testing Libraries. Running tests on the ReviewTable component allowed us to determine whether the component rendered without crashing by utilizing the render function provided by the React Testing Library. The ReviewTable component was wrapped inside a Router component imported from react-router-dom, to establish the necessary routing context for components that rely on React Router. This configuration allows the test to simulate the environment in which the component operates accurately. Overall, the test file serves as a quality assurance measure, verifying that the ReviewTable component can render successfully and integrate correctly with the React Router.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.test.tsx ReviewTable.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render} from '@testing-library/react';&lt;br /&gt;
import { BrowserRouter as Router } from 'react-router-dom';&lt;br /&gt;
import ReviewTable from './ReviewTable';&lt;br /&gt;
&lt;br /&gt;
describe('ReviewTable component', () =&amp;gt; {&lt;br /&gt;
    test('renders without crashing', () =&amp;gt; {&lt;br /&gt;
        render(&lt;br /&gt;
          &amp;lt;Router&amp;gt; {/* Wrap your component with Router */}&lt;br /&gt;
            &amp;lt;ReviewTable /&amp;gt;&lt;br /&gt;
          &amp;lt;/Router&amp;gt;&lt;br /&gt;
        );&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Example of another test case '''&lt;br /&gt;
&lt;br /&gt;
This test ensures that the 'Open HeatMap Options' text changes when clicked and is expected to be on the screen again when closed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe('ReviewTable Toggle Menu', () =&amp;gt; {&lt;br /&gt;
  test('toggle menu name changes when clicked', () =&amp;gt; {&lt;br /&gt;
    render(&lt;br /&gt;
      &amp;lt;Router&amp;gt;&lt;br /&gt;
        &amp;lt;ReviewTable /&amp;gt;&lt;br /&gt;
      &amp;lt;/Router&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
    const menuTitleOpen = screen.getByText('▼ Open Heatmap Options ▼');&lt;br /&gt;
    // when rendered it should ask to open&lt;br /&gt;
    expect(menuTitleOpen).toBeInTheDocument()&lt;br /&gt;
    &lt;br /&gt;
    fireEvent.click(menuTitleOpen)&lt;br /&gt;
&lt;br /&gt;
    const menuTitleClose = screen.getByText('▲ Close Heatmap Options ▲');&lt;br /&gt;
    // state will change to true, so title should ask to be closed now&lt;br /&gt;
    expect(menuTitleClose).toBeInTheDocument()&lt;br /&gt;
&lt;br /&gt;
    // closing menu should make it go back to to open  &lt;br /&gt;
    fireEvent.click(menuTitleClose)&lt;br /&gt;
    expect(menuTitleOpen).toBeInTheDocument()&lt;br /&gt;
&lt;br /&gt;
  })&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
[[File: loyda_review_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for Statistics Component using Jest === &lt;br /&gt;
&lt;br /&gt;
*The Statistics component is validated using the Jest and React Testing Libraries. It employs the Jest and React Testing Library for testing purposes, along with the jest-dom library for custom assertions. The first test &amp;quot;renders the correct labels&amp;quot; ensures that the statistics table renders the correct labels. The second test &amp;quot;renders correct statistical information for each label&amp;quot; ensures that the statistical information is rendered correctly under each label. Lastly, their test &amp;quot;renders correct links&amp;quot; ensures that all the necessary links are rendered.  Overall, these tests comprehensively evaluate the rendering and functionality of the Statistics component.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statistics.test.tsx Statistics.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render, screen } from '@testing-library/react';&lt;br /&gt;
import '@testing-library/jest-dom/extend-expect'; // Import jest-dom for custom assertions&lt;br /&gt;
import Statistics from './Statistics'; // Import the component to test&lt;br /&gt;
&lt;br /&gt;
describe('Statistics', () =&amp;gt; {&lt;br /&gt;
  test('renders the correct labels', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('columnheader', { name: 'Submitted Work' });&lt;br /&gt;
    const element_2 = screen.getByRole('columnheader', { name: 'Author Feedback' });&lt;br /&gt;
    const element_3 = screen.getByRole('columnheader', { name: 'Teammate Review' });&lt;br /&gt;
    const element_4 = screen.getByRole('columnheader', { name: 'Contributor' });&lt;br /&gt;
    &lt;br /&gt;
    const element_5 = screen.getAllByText(/Average/i);&lt;br /&gt;
    const element_6 = screen.getAllByText(/Range/i);&lt;br /&gt;
    const element_7 = screen.getByRole('columnheader', { name: 'Final Score' });&lt;br /&gt;
&lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_6[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct statistical information for each label', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('cell', { name: 'ssshah26 (Siddharth Shah)' });&lt;br /&gt;
    const element_2 = screen.getByRole('cell', { name: 'Show Reviews (20)' });&lt;br /&gt;
    const element_3 = screen.getByRole('cell', { name: '99.99% - 100%' });&lt;br /&gt;
    const element_4 = screen.getByRole('cell', { name: '96.67 Show Author Feedback (10)' });&lt;br /&gt;
    const element_5 = screen.getByRole('cell', { name: '87% - 100%' });&lt;br /&gt;
    const element_6 = screen.getByRole('cell', { name: '4.64' });&lt;br /&gt;
    const element_7 = screen.getByRole('cell', { name: '90% - 100%' });&lt;br /&gt;
    const element_8 = screen.getByRole('cell', { name: '75% (in Finished)' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5).toBeInTheDocument();&lt;br /&gt;
    expect(element_6).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
    expect(element_8).toBeInTheDocument();&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct links', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('link', { name: 'show stats' });&lt;br /&gt;
    const element_2 = screen.getByRole('link', { name: 'ssshah26' });&lt;br /&gt;
    const element_3 = screen.getByRole('link', { name: 'Show Reviews' });&lt;br /&gt;
    const element_4 = screen.getByRole('link', { name: 'Show Author Feedback' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_statistics_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
* As a student I want to check all grading details of an assignment so that I can know my grade.&lt;br /&gt;
* As a student I want to see my submission of an assignment so that I can check what was submitted for a given assignment.&lt;br /&gt;
* As a student I want to see the names of my group team members so that I can know who I worked with.&lt;br /&gt;
* As a student I want to see the statistics of my grades so that I know my grade distribution.&lt;br /&gt;
* As a student I want to see if I got any late penalties so that I can know whether I got deducted points or not.&lt;br /&gt;
* As a student I want to have a way to view all the reviews that I got for the assignment so that I can read the viewer's responses.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This design document introduces a step-by-step plan for updating the &amp;quot;view-team-grades&amp;quot; page on Expertiza, aiming for a user interface that is visually appealing and simple. Using React and TypeScript, the goal is to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. A clear and flexible UI design makes it not only simple to maintain but also flexible enough for future upgrades. &lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160806</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160806"/>
		<updated>2024-12-04T08:51:14Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* ReviewTable.test.tsx */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible and Actual Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of statistics table: &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
The statistics table that encompasses the &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes. The changes are highlighted below.&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make it easier to read and understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
The two proposed changes highlighted above were combined to create a new statistics table. Each of the 2 proposed changes introduces good mechanisms for achieving clarity and delivering a visually appealing statistics table to the user. Below is a snapshot of the new statistics table. Notice how easy it is to read and follow the details in the table as opposed to the original table.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/Statistics.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statisticstsx Statistics.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 2. Change the Location and Format of Team Member List === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
The team member list is a type of information that should be readily available to the user. Instead, it is placed almost at the bottom of the page. Also, the font size is really small which makes it difficult to locate and read. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the &amp;quot;RoundSelector.tsx&amp;quot; file contains a function and its main purpose is to select the review round. However, its function is also to display the team member list. This violates the single responsibility principle. To fix this issue and allow the &amp;quot;RoundSelector&amp;quot; function to perform one function only, which in this case is to select the review round, it would be wise to move the code to gather and display the team information elsewhere — most likely inside the ReviewTable.tsx file.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of where the team member list is located in the UI. The team member list is outlined in red for visibility:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Notice how small the font size is. Also, the team list should be located at the beginning of the page because it is part of the basic information that should be rendered first.&lt;br /&gt;
&lt;br /&gt;
The current code to gather and display the team member list is located inside the &amp;quot;RoundSelector.tsx&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3b.png|450px]]&lt;br /&gt;
&lt;br /&gt;
Our goal is to change the location of the code snippets that are outlined in red to another location. This change will allow the RoundSelector function to only focus on selecting the review &amp;quot;Rounds&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Place the team list at the top of the page '''  &lt;br /&gt;
The possible location of the team list will be in between the &amp;quot;Team&amp;quot; and &amp;quot;Average peer review score&amp;quot; information. The text format will also be changed. A larger text size will be introduced. These changes will allow the user to locate the list of the names of his/her team.&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Change the location of the code that gathers and displays the team list elsewhere '''&lt;br /&gt;
Changing the location of the code from the &amp;quot;RoundSelector.tsx&amp;quot; file to the &amp;quot;ReviewTable.tsx&amp;quot; file would allow us to fix the violation of the single responsibility principle in &amp;quot;RoundSelector.tsx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
Below is a screenshot of the new location of the team member list outlined in red for visibility. Notice that the team member list is easy to locate as well as easy to read. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Also, we changed the code to gather and display the team member list in the &amp;quot;ReviewTable.tsx&amp;quot; file. The new code snippets added are outlined in red for visibility&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3d.png]]&lt;br /&gt;
&lt;br /&gt;
The new &amp;quot;RoundSelector.tsx&amp;quot; contains the function that is ONLY focussed on selecting the review &amp;quot;Round&amp;quot; and thus obeys the single responsibility principle. A snapshot of the new function is provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3e.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/RoundSelector.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/RoundSelelctor.tsx RoundSelector.tsx]&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.tsx ReviewTable.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 3.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Export buttons for CSV and Excel are located below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Utilizes the SheetJS (xlsx) library to generate exportable files. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. File structure matches the table's visible data. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const exportTableData = (format: &amp;quot;csv&amp;quot; | &amp;quot;xlsx&amp;quot;) =&amp;gt; {&lt;br /&gt;
    const tableData = initialData.map((row) =&amp;gt; {&lt;br /&gt;
        const rowData: Record&amp;lt;string, any&amp;gt; = {};&lt;br /&gt;
        columns.forEach((col) =&amp;gt; {&lt;br /&gt;
            const accessor = col.id; // Use column `id` for keys&lt;br /&gt;
            if (accessor) {&lt;br /&gt;
                rowData[accessor] = row[accessor];&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
        return rowData;&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    const worksheet = XLSX.utils.json_to_sheet(tableData);&lt;br /&gt;
    const workbook = XLSX.utils.book_new();&lt;br /&gt;
    XLSX.utils.book_append_sheet(workbook, worksheet, &amp;quot;TableData&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    const fileType = format === &amp;quot;csv&amp;quot; ? &amp;quot;csv&amp;quot; : &amp;quot;xlsx&amp;quot;;&lt;br /&gt;
    XLSX.writeFile(workbook, `table_data.${fileType}`);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Export Buttons in the UI:'''&lt;br /&gt;
&amp;lt;div style={{ marginTop: &amp;quot;10px&amp;quot; }}&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;csv&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary me-2&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to CSV&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;xlsx&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to Excel&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing:'''&lt;br /&gt;
it(&amp;quot;renders export buttons&amp;quot;, () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Table data={mockData} columns={mockColumns} /&amp;gt;);&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to CSV&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to Excel&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
=== 4.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const [lastUpdated, setLastUpdated] = useState&amp;lt;Date | null&amp;gt;(null);&lt;br /&gt;
&lt;br /&gt;
const refreshTableData = () =&amp;gt; {&lt;br /&gt;
    setLastUpdated(new Date());&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
=== 5.Extending toggle options === &lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
While the heat map provides a great visual representation of the users feedback, with the addition of some 'toggles' we can better idea of the different values. Currently, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: old_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
In this current mode, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_opened.png|650px]]&lt;br /&gt;
&lt;br /&gt;
In the updated version, since more toggle options were added, there is now a heat map option menu, that can be opened and closed. When open, there are 4 different checkboxes to check from that each provide their own way of helping the student better analyze their team grade. When the checkbox are checked, it will add a column to the heat map for the corresponding criteria.&lt;br /&gt;
&lt;br /&gt;
When menu is closed:&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_closed.png|300px]]&lt;br /&gt;
&lt;br /&gt;
==== Supporting Code for Toggle Options ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
Here is the supporting code for the 3 new toggle options, showToggle10WordComments, showToggle20WordComments, and showToggleCustomWordComment are all boolean values that if their state is set to true filter and count reviews based on the properties of their comments. When they're set to true, it will first ensure that the comments are defined as strings and not undefined (since a user can leave a review without providing a comment), it will then filter over the reviews array within a row and filter and return the total number of comments that meet the respective criteria.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' Custom Feature Toggle '''&lt;br /&gt;
&lt;br /&gt;
[[File: simon_custom_checkbox_clicked.png|500px]]&lt;br /&gt;
&lt;br /&gt;
In the Heat Map Option panel, there is a custom checkbox, that when clicked, will allow the users to use the arrow to search within the comments to see how many are &amp;gt;= the input value.&lt;br /&gt;
&lt;br /&gt;
==== Supporting Code ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
In the panel, when the checkbox is clicked, it will update the state for showToggleCustomWordComment to be true, which will then render what can be seen in the previous screenshot. When using the input element, since you can use your keyboard to delete the value and type it in, when you delete the value, when it makes the onChange callback, the current empty string will be based to the inputValue set state giving it a NaN value, so if the onChange is an empty string it will set the value back to 0, which is what the confirmInputValue function is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTableRow.tsx&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* src/pages/ViewTeamGrades/App.tsx&lt;br /&gt;
* src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagram ==&lt;br /&gt;
&lt;br /&gt;
The use case diagram for the &amp;quot;view-team-grades&amp;quot; page after clicking &amp;quot;Grades View&amp;quot; in Expertiza highlights various interactions with the UI. Here's a general outline of possible actors and use cases:&lt;br /&gt;
&lt;br /&gt;
=== Actors: ===&lt;br /&gt;
&lt;br /&gt;
* Student - Primarily interacts with the UI to view all the grading details for an assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases: ===&lt;br /&gt;
 &lt;br /&gt;
* View detailed grade of a particular assignment - Including assignment name, team name, average score, etc.&lt;br /&gt;
* Show Submission - This link redirects the student to a new page where the student can see his/her submission details.&lt;br /&gt;
* Show Stats - This link redirects the student to a new page where the student can see grading statistics.&lt;br /&gt;
* Submitted Work - This table shows the average and range of submitted work grades. &lt;br /&gt;
**Show Reviews - This link located in the &amp;quot;Submitted Work&amp;quot; table redirects the student to the page that renders all the reviews that the student obtained from his/her peers.&lt;br /&gt;
* Author Feedback - This table shows the average and range of author feedback for the submitted work. &lt;br /&gt;
**Show Author Feedback - This link located in the &amp;quot;Author Feedback&amp;quot; table redirects the student to the page that renders the author feedback that the student obtained after writing a review.&lt;br /&gt;
* Teammate Review - This table shows the average and range of teammate reviews for the submitted work.&lt;br /&gt;
* Back - Link that enables the student to go back to the main page&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[File: yusufov_d2.png |750px|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
To validate the newly designed &amp;quot;View Submissions&amp;quot; page's functionality, usability, and performance while meeting the goals of clarity, consistency, flexibility, and intuitivenes. &lt;br /&gt;
&lt;br /&gt;
=== Testing Scope ===&lt;br /&gt;
1. Component Validation&lt;br /&gt;
* Test individual React components like ReviewTable.tsx and Statistics.tsx.&lt;br /&gt;
2. API Integration&lt;br /&gt;
* Verify API calls using useAPI.ts to ensure seamless backend integration.&lt;br /&gt;
3. Dynamic Features&lt;br /&gt;
* Test real-time updates (e.g., &amp;quot;Last Updated&amp;quot; timestamps).&lt;br /&gt;
&lt;br /&gt;
=== Test Cases: ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Test Case ID&lt;br /&gt;
! Test Description&lt;br /&gt;
! Expected Outcome&lt;br /&gt;
! Priority&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
| TC001&lt;br /&gt;
| Verify assignment name display&lt;br /&gt;
| Assignment names appear accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC002&lt;br /&gt;
| Validate &amp;quot;Show Stats&amp;quot; link&lt;br /&gt;
| Redirects to accurate grading statistics page.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC003&lt;br /&gt;
| Test pagination in tables&lt;br /&gt;
| Pagination works correctly for large datasets.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC004&lt;br /&gt;
| Test table export functionality&lt;br /&gt;
| CSV and Excel files match table content accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC005&lt;br /&gt;
| Validate data rendering&lt;br /&gt;
| Tables display data using mock files like `dummyData.json`.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC006&lt;br /&gt;
| Test error handling for missing data&lt;br /&gt;
| UI displays appropriate placeholders or messages for empty datasets.&lt;br /&gt;
| Low&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC007&lt;br /&gt;
| Verify contributor details&lt;br /&gt;
| Names and user IDs are displayed accurately.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC008&lt;br /&gt;
| Validate new thresholds for review length&lt;br /&gt;
| Dynamic thresholds for word/character counts update and display correctly.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
&lt;br /&gt;
Unit Testing:&lt;br /&gt;
*Write tests for individual components like ReviewTable using Jest.&lt;br /&gt;
*Validate utility functions in utils.ts.&lt;br /&gt;
&lt;br /&gt;
Integration Testing:&lt;br /&gt;
* Test the interaction between App.tsx and its child components.&lt;br /&gt;
* Validate API responses using axios_client.ts.&lt;br /&gt;
&lt;br /&gt;
Performance Testing:&lt;br /&gt;
* Simulate exporting large datasets to assess system performance.&lt;br /&gt;
* Measure response times for table rendering with dummyData.json.&lt;br /&gt;
&lt;br /&gt;
Accessibility Testing:&lt;br /&gt;
*Test keyboard navigation and WCAG 2.1 compliance.&lt;br /&gt;
&lt;br /&gt;
== Actual Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for ReviewTable using Jest === &lt;br /&gt;
&lt;br /&gt;
*The ReviewTable component is validated using the Jest and React Testing Libraries. Running tests on the ReviewTable component allowed us to determine whether the component rendered without crashing by utilizing the render function provided by the React Testing Library. The ReviewTable component was wrapped inside a Router component imported from react-router-dom, to establish the necessary routing context for components that rely on React Router. This configuration allows the test to simulate the environment in which the component operates accurately. Overall, the test file serves as a quality assurance measure, verifying that the ReviewTable component can render successfully and integrate correctly with the React Router.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.test.tsx ReviewTable.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render} from '@testing-library/react';&lt;br /&gt;
import { BrowserRouter as Router } from 'react-router-dom';&lt;br /&gt;
import ReviewTable from './ReviewTable';&lt;br /&gt;
&lt;br /&gt;
describe('ReviewTable component', () =&amp;gt; {&lt;br /&gt;
    test('renders without crashing', () =&amp;gt; {&lt;br /&gt;
        render(&lt;br /&gt;
          &amp;lt;Router&amp;gt; {/* Wrap your component with Router */}&lt;br /&gt;
            &amp;lt;ReviewTable /&amp;gt;&lt;br /&gt;
          &amp;lt;/Router&amp;gt;&lt;br /&gt;
        );&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Example of another test case '''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe('ReviewTable Toggle Menu', () =&amp;gt; {&lt;br /&gt;
  test('toggle menu name changes when clicked', () =&amp;gt; {&lt;br /&gt;
    render(&lt;br /&gt;
      &amp;lt;Router&amp;gt;&lt;br /&gt;
        &amp;lt;ReviewTable /&amp;gt;&lt;br /&gt;
      &amp;lt;/Router&amp;gt;&lt;br /&gt;
    )&lt;br /&gt;
    const menuTitleOpen = screen.getByText('▼ Open Heatmap Options ▼');&lt;br /&gt;
    // when rendered it should ask to open&lt;br /&gt;
    expect(menuTitleOpen).toBeInTheDocument()&lt;br /&gt;
    &lt;br /&gt;
    fireEvent.click(menuTitleOpen)&lt;br /&gt;
&lt;br /&gt;
    const menuTitleClose = screen.getByText('▲ Close Heatmap Options ▲');&lt;br /&gt;
    // state will change to true, so title should ask to be closed now&lt;br /&gt;
    expect(menuTitleClose).toBeInTheDocument()&lt;br /&gt;
&lt;br /&gt;
    // closing menu should make it go back to to open  &lt;br /&gt;
    fireEvent.click(menuTitleClose)&lt;br /&gt;
    expect(menuTitleOpen).toBeInTheDocument()&lt;br /&gt;
&lt;br /&gt;
  })&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
[[File: loyda_review_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for Statistics Component using Jest === &lt;br /&gt;
&lt;br /&gt;
*The Statistics component is validated using the Jest and React Testing Libraries. It employs the Jest and React Testing Library for testing purposes, along with the jest-dom library for custom assertions. The first test &amp;quot;renders the correct labels&amp;quot; ensures that the statistics table renders the correct labels. The second test &amp;quot;renders correct statistical information for each label&amp;quot; ensures that the statistical information is rendered correctly under each label. Lastly, their test &amp;quot;renders correct links&amp;quot; ensures that all the necessary links are rendered.  Overall, these tests comprehensively evaluate the rendering and functionality of the Statistics component.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statistics.test.tsx Statistics.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render, screen } from '@testing-library/react';&lt;br /&gt;
import '@testing-library/jest-dom/extend-expect'; // Import jest-dom for custom assertions&lt;br /&gt;
import Statistics from './Statistics'; // Import the component to test&lt;br /&gt;
&lt;br /&gt;
describe('Statistics', () =&amp;gt; {&lt;br /&gt;
  test('renders the correct labels', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('columnheader', { name: 'Submitted Work' });&lt;br /&gt;
    const element_2 = screen.getByRole('columnheader', { name: 'Author Feedback' });&lt;br /&gt;
    const element_3 = screen.getByRole('columnheader', { name: 'Teammate Review' });&lt;br /&gt;
    const element_4 = screen.getByRole('columnheader', { name: 'Contributor' });&lt;br /&gt;
    &lt;br /&gt;
    const element_5 = screen.getAllByText(/Average/i);&lt;br /&gt;
    const element_6 = screen.getAllByText(/Range/i);&lt;br /&gt;
    const element_7 = screen.getByRole('columnheader', { name: 'Final Score' });&lt;br /&gt;
&lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_6[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct statistical information for each label', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('cell', { name: 'ssshah26 (Siddharth Shah)' });&lt;br /&gt;
    const element_2 = screen.getByRole('cell', { name: 'Show Reviews (20)' });&lt;br /&gt;
    const element_3 = screen.getByRole('cell', { name: '99.99% - 100%' });&lt;br /&gt;
    const element_4 = screen.getByRole('cell', { name: '96.67 Show Author Feedback (10)' });&lt;br /&gt;
    const element_5 = screen.getByRole('cell', { name: '87% - 100%' });&lt;br /&gt;
    const element_6 = screen.getByRole('cell', { name: '4.64' });&lt;br /&gt;
    const element_7 = screen.getByRole('cell', { name: '90% - 100%' });&lt;br /&gt;
    const element_8 = screen.getByRole('cell', { name: '75% (in Finished)' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5).toBeInTheDocument();&lt;br /&gt;
    expect(element_6).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
    expect(element_8).toBeInTheDocument();&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct links', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('link', { name: 'show stats' });&lt;br /&gt;
    const element_2 = screen.getByRole('link', { name: 'ssshah26' });&lt;br /&gt;
    const element_3 = screen.getByRole('link', { name: 'Show Reviews' });&lt;br /&gt;
    const element_4 = screen.getByRole('link', { name: 'Show Author Feedback' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_statistics_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
* As a student I want to check all grading details of an assignment so that I can know my grade.&lt;br /&gt;
* As a student I want to see my submission of an assignment so that I can check what was submitted for a given assignment.&lt;br /&gt;
* As a student I want to see the names of my group team members so that I can know who I worked with.&lt;br /&gt;
* As a student I want to see the statistics of my grades so that I know my grade distribution.&lt;br /&gt;
* As a student I want to see if I got any late penalties so that I can know whether I got deducted points or not.&lt;br /&gt;
* As a student I want to have a way to view all the reviews that I got for the assignment so that I can read the viewer's responses.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This design document introduces a step-by-step plan for updating the &amp;quot;view-team-grades&amp;quot; page on Expertiza, aiming for a user interface that is visually appealing and simple. Using React and TypeScript, the goal is to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. A clear and flexible UI design makes it not only simple to maintain but also flexible enough for future upgrades. &lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160805</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160805"/>
		<updated>2024-12-04T08:46:22Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Detail Description of Possible and Actual Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible and Actual Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of statistics table: &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
The statistics table that encompasses the &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes. The changes are highlighted below.&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make it easier to read and understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
The two proposed changes highlighted above were combined to create a new statistics table. Each of the 2 proposed changes introduces good mechanisms for achieving clarity and delivering a visually appealing statistics table to the user. Below is a snapshot of the new statistics table. Notice how easy it is to read and follow the details in the table as opposed to the original table.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/Statistics.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statisticstsx Statistics.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 2. Change the Location and Format of Team Member List === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
The team member list is a type of information that should be readily available to the user. Instead, it is placed almost at the bottom of the page. Also, the font size is really small which makes it difficult to locate and read. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the &amp;quot;RoundSelector.tsx&amp;quot; file contains a function and its main purpose is to select the review round. However, its function is also to display the team member list. This violates the single responsibility principle. To fix this issue and allow the &amp;quot;RoundSelector&amp;quot; function to perform one function only, which in this case is to select the review round, it would be wise to move the code to gather and display the team information elsewhere — most likely inside the ReviewTable.tsx file.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of where the team member list is located in the UI. The team member list is outlined in red for visibility:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Notice how small the font size is. Also, the team list should be located at the beginning of the page because it is part of the basic information that should be rendered first.&lt;br /&gt;
&lt;br /&gt;
The current code to gather and display the team member list is located inside the &amp;quot;RoundSelector.tsx&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3b.png|450px]]&lt;br /&gt;
&lt;br /&gt;
Our goal is to change the location of the code snippets that are outlined in red to another location. This change will allow the RoundSelector function to only focus on selecting the review &amp;quot;Rounds&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Place the team list at the top of the page '''  &lt;br /&gt;
The possible location of the team list will be in between the &amp;quot;Team&amp;quot; and &amp;quot;Average peer review score&amp;quot; information. The text format will also be changed. A larger text size will be introduced. These changes will allow the user to locate the list of the names of his/her team.&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Change the location of the code that gathers and displays the team list elsewhere '''&lt;br /&gt;
Changing the location of the code from the &amp;quot;RoundSelector.tsx&amp;quot; file to the &amp;quot;ReviewTable.tsx&amp;quot; file would allow us to fix the violation of the single responsibility principle in &amp;quot;RoundSelector.tsx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
Below is a screenshot of the new location of the team member list outlined in red for visibility. Notice that the team member list is easy to locate as well as easy to read. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Also, we changed the code to gather and display the team member list in the &amp;quot;ReviewTable.tsx&amp;quot; file. The new code snippets added are outlined in red for visibility&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3d.png]]&lt;br /&gt;
&lt;br /&gt;
The new &amp;quot;RoundSelector.tsx&amp;quot; contains the function that is ONLY focussed on selecting the review &amp;quot;Round&amp;quot; and thus obeys the single responsibility principle. A snapshot of the new function is provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3e.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/RoundSelector.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/RoundSelelctor.tsx RoundSelector.tsx]&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.tsx ReviewTable.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 3.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Export buttons for CSV and Excel are located below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Utilizes the SheetJS (xlsx) library to generate exportable files. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. File structure matches the table's visible data. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const exportTableData = (format: &amp;quot;csv&amp;quot; | &amp;quot;xlsx&amp;quot;) =&amp;gt; {&lt;br /&gt;
    const tableData = initialData.map((row) =&amp;gt; {&lt;br /&gt;
        const rowData: Record&amp;lt;string, any&amp;gt; = {};&lt;br /&gt;
        columns.forEach((col) =&amp;gt; {&lt;br /&gt;
            const accessor = col.id; // Use column `id` for keys&lt;br /&gt;
            if (accessor) {&lt;br /&gt;
                rowData[accessor] = row[accessor];&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
        return rowData;&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    const worksheet = XLSX.utils.json_to_sheet(tableData);&lt;br /&gt;
    const workbook = XLSX.utils.book_new();&lt;br /&gt;
    XLSX.utils.book_append_sheet(workbook, worksheet, &amp;quot;TableData&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    const fileType = format === &amp;quot;csv&amp;quot; ? &amp;quot;csv&amp;quot; : &amp;quot;xlsx&amp;quot;;&lt;br /&gt;
    XLSX.writeFile(workbook, `table_data.${fileType}`);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Export Buttons in the UI:'''&lt;br /&gt;
&amp;lt;div style={{ marginTop: &amp;quot;10px&amp;quot; }}&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;csv&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary me-2&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to CSV&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;xlsx&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to Excel&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing:'''&lt;br /&gt;
it(&amp;quot;renders export buttons&amp;quot;, () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Table data={mockData} columns={mockColumns} /&amp;gt;);&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to CSV&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to Excel&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
=== 4.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const [lastUpdated, setLastUpdated] = useState&amp;lt;Date | null&amp;gt;(null);&lt;br /&gt;
&lt;br /&gt;
const refreshTableData = () =&amp;gt; {&lt;br /&gt;
    setLastUpdated(new Date());&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
=== 5.Extending toggle options === &lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
While the heat map provides a great visual representation of the users feedback, with the addition of some 'toggles' we can better idea of the different values. Currently, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: old_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
In this current mode, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_opened.png|650px]]&lt;br /&gt;
&lt;br /&gt;
In the updated version, since more toggle options were added, there is now a heat map option menu, that can be opened and closed. When open, there are 4 different checkboxes to check from that each provide their own way of helping the student better analyze their team grade. When the checkbox are checked, it will add a column to the heat map for the corresponding criteria.&lt;br /&gt;
&lt;br /&gt;
When menu is closed:&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_closed.png|300px]]&lt;br /&gt;
&lt;br /&gt;
==== Supporting Code for Toggle Options ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
Here is the supporting code for the 3 new toggle options, showToggle10WordComments, showToggle20WordComments, and showToggleCustomWordComment are all boolean values that if their state is set to true filter and count reviews based on the properties of their comments. When they're set to true, it will first ensure that the comments are defined as strings and not undefined (since a user can leave a review without providing a comment), it will then filter over the reviews array within a row and filter and return the total number of comments that meet the respective criteria.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' Custom Feature Toggle '''&lt;br /&gt;
&lt;br /&gt;
[[File: simon_custom_checkbox_clicked.png|500px]]&lt;br /&gt;
&lt;br /&gt;
In the Heat Map Option panel, there is a custom checkbox, that when clicked, will allow the users to use the arrow to search within the comments to see how many are &amp;gt;= the input value.&lt;br /&gt;
&lt;br /&gt;
==== Supporting Code ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
In the panel, when the checkbox is clicked, it will update the state for showToggleCustomWordComment to be true, which will then render what can be seen in the previous screenshot. When using the input element, since you can use your keyboard to delete the value and type it in, when you delete the value, when it makes the onChange callback, the current empty string will be based to the inputValue set state giving it a NaN value, so if the onChange is an empty string it will set the value back to 0, which is what the confirmInputValue function is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTableRow.tsx&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* src/pages/ViewTeamGrades/App.tsx&lt;br /&gt;
* src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagram ==&lt;br /&gt;
&lt;br /&gt;
The use case diagram for the &amp;quot;view-team-grades&amp;quot; page after clicking &amp;quot;Grades View&amp;quot; in Expertiza highlights various interactions with the UI. Here's a general outline of possible actors and use cases:&lt;br /&gt;
&lt;br /&gt;
=== Actors: ===&lt;br /&gt;
&lt;br /&gt;
* Student - Primarily interacts with the UI to view all the grading details for an assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases: ===&lt;br /&gt;
 &lt;br /&gt;
* View detailed grade of a particular assignment - Including assignment name, team name, average score, etc.&lt;br /&gt;
* Show Submission - This link redirects the student to a new page where the student can see his/her submission details.&lt;br /&gt;
* Show Stats - This link redirects the student to a new page where the student can see grading statistics.&lt;br /&gt;
* Submitted Work - This table shows the average and range of submitted work grades. &lt;br /&gt;
**Show Reviews - This link located in the &amp;quot;Submitted Work&amp;quot; table redirects the student to the page that renders all the reviews that the student obtained from his/her peers.&lt;br /&gt;
* Author Feedback - This table shows the average and range of author feedback for the submitted work. &lt;br /&gt;
**Show Author Feedback - This link located in the &amp;quot;Author Feedback&amp;quot; table redirects the student to the page that renders the author feedback that the student obtained after writing a review.&lt;br /&gt;
* Teammate Review - This table shows the average and range of teammate reviews for the submitted work.&lt;br /&gt;
* Back - Link that enables the student to go back to the main page&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[File: yusufov_d2.png |750px|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
To validate the newly designed &amp;quot;View Submissions&amp;quot; page's functionality, usability, and performance while meeting the goals of clarity, consistency, flexibility, and intuitivenes. &lt;br /&gt;
&lt;br /&gt;
=== Testing Scope ===&lt;br /&gt;
1. Component Validation&lt;br /&gt;
* Test individual React components like ReviewTable.tsx and Statistics.tsx.&lt;br /&gt;
2. API Integration&lt;br /&gt;
* Verify API calls using useAPI.ts to ensure seamless backend integration.&lt;br /&gt;
3. Dynamic Features&lt;br /&gt;
* Test real-time updates (e.g., &amp;quot;Last Updated&amp;quot; timestamps).&lt;br /&gt;
&lt;br /&gt;
=== Test Cases: ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Test Case ID&lt;br /&gt;
! Test Description&lt;br /&gt;
! Expected Outcome&lt;br /&gt;
! Priority&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
| TC001&lt;br /&gt;
| Verify assignment name display&lt;br /&gt;
| Assignment names appear accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC002&lt;br /&gt;
| Validate &amp;quot;Show Stats&amp;quot; link&lt;br /&gt;
| Redirects to accurate grading statistics page.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC003&lt;br /&gt;
| Test pagination in tables&lt;br /&gt;
| Pagination works correctly for large datasets.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC004&lt;br /&gt;
| Test table export functionality&lt;br /&gt;
| CSV and Excel files match table content accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC005&lt;br /&gt;
| Validate data rendering&lt;br /&gt;
| Tables display data using mock files like `dummyData.json`.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC006&lt;br /&gt;
| Test error handling for missing data&lt;br /&gt;
| UI displays appropriate placeholders or messages for empty datasets.&lt;br /&gt;
| Low&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC007&lt;br /&gt;
| Verify contributor details&lt;br /&gt;
| Names and user IDs are displayed accurately.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC008&lt;br /&gt;
| Validate new thresholds for review length&lt;br /&gt;
| Dynamic thresholds for word/character counts update and display correctly.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
&lt;br /&gt;
Unit Testing:&lt;br /&gt;
*Write tests for individual components like ReviewTable using Jest.&lt;br /&gt;
*Validate utility functions in utils.ts.&lt;br /&gt;
&lt;br /&gt;
Integration Testing:&lt;br /&gt;
* Test the interaction between App.tsx and its child components.&lt;br /&gt;
* Validate API responses using axios_client.ts.&lt;br /&gt;
&lt;br /&gt;
Performance Testing:&lt;br /&gt;
* Simulate exporting large datasets to assess system performance.&lt;br /&gt;
* Measure response times for table rendering with dummyData.json.&lt;br /&gt;
&lt;br /&gt;
Accessibility Testing:&lt;br /&gt;
*Test keyboard navigation and WCAG 2.1 compliance.&lt;br /&gt;
&lt;br /&gt;
== Actual Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for ReviewTable using Jest === &lt;br /&gt;
&lt;br /&gt;
*The ReviewTable component is validated using the Jest and React Testing Libraries. Running tests on the ReviewTable component allowed us to determine whether the component rendered without crashing by utilizing the render function provided by the React Testing Library. The ReviewTable component was wrapped inside a Router component imported from react-router-dom, to establish the necessary routing context for components that rely on React Router. This configuration allows the test to simulate the environment in which the component operates accurately. Overall, the test file serves as a quality assurance measure, verifying that the ReviewTable component can render successfully and integrate correctly with the React Router.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.test.tsx ReviewTable.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render} from '@testing-library/react';&lt;br /&gt;
import { BrowserRouter as Router } from 'react-router-dom';&lt;br /&gt;
import ReviewTable from './ReviewTable';&lt;br /&gt;
&lt;br /&gt;
describe('ReviewTable component', () =&amp;gt; {&lt;br /&gt;
    test('renders without crashing', () =&amp;gt; {&lt;br /&gt;
        render(&lt;br /&gt;
          &amp;lt;Router&amp;gt; {/* Wrap your component with Router */}&lt;br /&gt;
            &amp;lt;ReviewTable /&amp;gt;&lt;br /&gt;
          &amp;lt;/Router&amp;gt;&lt;br /&gt;
        );&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
[[File: loyda_review_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for Statistics Component using Jest === &lt;br /&gt;
&lt;br /&gt;
*The Statistics component is validated using the Jest and React Testing Libraries. It employs the Jest and React Testing Library for testing purposes, along with the jest-dom library for custom assertions. The first test &amp;quot;renders the correct labels&amp;quot; ensures that the statistics table renders the correct labels. The second test &amp;quot;renders correct statistical information for each label&amp;quot; ensures that the statistical information is rendered correctly under each label. Lastly, their test &amp;quot;renders correct links&amp;quot; ensures that all the necessary links are rendered.  Overall, these tests comprehensively evaluate the rendering and functionality of the Statistics component.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statistics.test.tsx Statistics.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render, screen } from '@testing-library/react';&lt;br /&gt;
import '@testing-library/jest-dom/extend-expect'; // Import jest-dom for custom assertions&lt;br /&gt;
import Statistics from './Statistics'; // Import the component to test&lt;br /&gt;
&lt;br /&gt;
describe('Statistics', () =&amp;gt; {&lt;br /&gt;
  test('renders the correct labels', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('columnheader', { name: 'Submitted Work' });&lt;br /&gt;
    const element_2 = screen.getByRole('columnheader', { name: 'Author Feedback' });&lt;br /&gt;
    const element_3 = screen.getByRole('columnheader', { name: 'Teammate Review' });&lt;br /&gt;
    const element_4 = screen.getByRole('columnheader', { name: 'Contributor' });&lt;br /&gt;
    &lt;br /&gt;
    const element_5 = screen.getAllByText(/Average/i);&lt;br /&gt;
    const element_6 = screen.getAllByText(/Range/i);&lt;br /&gt;
    const element_7 = screen.getByRole('columnheader', { name: 'Final Score' });&lt;br /&gt;
&lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_6[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct statistical information for each label', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('cell', { name: 'ssshah26 (Siddharth Shah)' });&lt;br /&gt;
    const element_2 = screen.getByRole('cell', { name: 'Show Reviews (20)' });&lt;br /&gt;
    const element_3 = screen.getByRole('cell', { name: '99.99% - 100%' });&lt;br /&gt;
    const element_4 = screen.getByRole('cell', { name: '96.67 Show Author Feedback (10)' });&lt;br /&gt;
    const element_5 = screen.getByRole('cell', { name: '87% - 100%' });&lt;br /&gt;
    const element_6 = screen.getByRole('cell', { name: '4.64' });&lt;br /&gt;
    const element_7 = screen.getByRole('cell', { name: '90% - 100%' });&lt;br /&gt;
    const element_8 = screen.getByRole('cell', { name: '75% (in Finished)' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5).toBeInTheDocument();&lt;br /&gt;
    expect(element_6).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
    expect(element_8).toBeInTheDocument();&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct links', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('link', { name: 'show stats' });&lt;br /&gt;
    const element_2 = screen.getByRole('link', { name: 'ssshah26' });&lt;br /&gt;
    const element_3 = screen.getByRole('link', { name: 'Show Reviews' });&lt;br /&gt;
    const element_4 = screen.getByRole('link', { name: 'Show Author Feedback' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_statistics_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
* As a student I want to check all grading details of an assignment so that I can know my grade.&lt;br /&gt;
* As a student I want to see my submission of an assignment so that I can check what was submitted for a given assignment.&lt;br /&gt;
* As a student I want to see the names of my group team members so that I can know who I worked with.&lt;br /&gt;
* As a student I want to see the statistics of my grades so that I know my grade distribution.&lt;br /&gt;
* As a student I want to see if I got any late penalties so that I can know whether I got deducted points or not.&lt;br /&gt;
* As a student I want to have a way to view all the reviews that I got for the assignment so that I can read the viewer's responses.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This design document introduces a step-by-step plan for updating the &amp;quot;view-team-grades&amp;quot; page on Expertiza, aiming for a user interface that is visually appealing and simple. Using React and TypeScript, the goal is to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. A clear and flexible UI design makes it not only simple to maintain but also flexible enough for future upgrades. &lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160804</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160804"/>
		<updated>2024-12-04T08:45:27Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Actual Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible and Actual Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of statistics table: &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
The statistics table that encompasses the &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes. The changes are highlighted below.&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make it easier to read and understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
The two proposed changes highlighted above were combined to create a new statistics table. Each of the 2 proposed changes introduces good mechanisms for achieving clarity and delivering a visually appealing statistics table to the user. Below is a snapshot of the new statistics table. Notice how easy it is to read and follow the details in the table as opposed to the original table.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/Statistics.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statisticstsx Statistics.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 2. Change the Location and Format of Team Member List === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
The team member list is a type of information that should be readily available to the user. Instead, it is placed almost at the bottom of the page. Also, the font size is really small which makes it difficult to locate and read. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the &amp;quot;RoundSelector.tsx&amp;quot; file contains a function and its main purpose is to select the review round. However, its function is also to display the team member list. This violates the single responsibility principle. To fix this issue and allow the &amp;quot;RoundSelector&amp;quot; function to perform one function only, which in this case is to select the review round, it would be wise to move the code to gather and display the team information elsewhere — most likely inside the ReviewTable.tsx file.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of where the team member list is located in the UI. The team member list is outlined in red for visibility:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Notice how small the font size is. Also, the team list should be located at the beginning of the page because it is part of the basic information that should be rendered first.&lt;br /&gt;
&lt;br /&gt;
The current code to gather and display the team member list is located inside the &amp;quot;RoundSelector.tsx&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3b.png|450px]]&lt;br /&gt;
&lt;br /&gt;
Our goal is to change the location of the code snippets that are outlined in red to another location. This change will allow the RoundSelector function to only focus on selecting the review &amp;quot;Rounds&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Place the team list at the top of the page '''  &lt;br /&gt;
The possible location of the team list will be in between the &amp;quot;Team&amp;quot; and &amp;quot;Average peer review score&amp;quot; information. The text format will also be changed. A larger text size will be introduced. These changes will allow the user to locate the list of the names of his/her team.&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Change the location of the code that gathers and displays the team list elsewhere '''&lt;br /&gt;
Changing the location of the code from the &amp;quot;RoundSelector.tsx&amp;quot; file to the &amp;quot;ReviewTable.tsx&amp;quot; file would allow us to fix the violation of the single responsibility principle in &amp;quot;RoundSelector.tsx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
Below is a screenshot of the new location of the team member list outlined in red for visibility. Notice that the team member list is easy to locate as well as easy to read. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Also, we changed the code to gather and display the team member list in the &amp;quot;ReviewTable.tsx&amp;quot; file. The new code snippets added are outlined in red for visibility&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3d.png]]&lt;br /&gt;
&lt;br /&gt;
The new &amp;quot;RoundSelector.tsx&amp;quot; contains the function that is ONLY focussed on selecting the review &amp;quot;Round&amp;quot; and thus obeys the single responsibility principle. A snapshot of the new function is provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3e.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/RoundSelector.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/RoundSelelctor.tsx RoundSelector.tsx]&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.tsx ReviewTable.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 3.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Export buttons for CSV and Excel are located below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Utilizes the SheetJS (xlsx) library to generate exportable files. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. File structure matches the table's visible data. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const exportTableData = (format: &amp;quot;csv&amp;quot; | &amp;quot;xlsx&amp;quot;) =&amp;gt; {&lt;br /&gt;
    const tableData = initialData.map((row) =&amp;gt; {&lt;br /&gt;
        const rowData: Record&amp;lt;string, any&amp;gt; = {};&lt;br /&gt;
        columns.forEach((col) =&amp;gt; {&lt;br /&gt;
            const accessor = col.id; // Use column `id` for keys&lt;br /&gt;
            if (accessor) {&lt;br /&gt;
                rowData[accessor] = row[accessor];&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
        return rowData;&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    const worksheet = XLSX.utils.json_to_sheet(tableData);&lt;br /&gt;
    const workbook = XLSX.utils.book_new();&lt;br /&gt;
    XLSX.utils.book_append_sheet(workbook, worksheet, &amp;quot;TableData&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    const fileType = format === &amp;quot;csv&amp;quot; ? &amp;quot;csv&amp;quot; : &amp;quot;xlsx&amp;quot;;&lt;br /&gt;
    XLSX.writeFile(workbook, `table_data.${fileType}`);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Export Buttons in the UI:'''&lt;br /&gt;
&amp;lt;div style={{ marginTop: &amp;quot;10px&amp;quot; }}&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;csv&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary me-2&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to CSV&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;xlsx&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to Excel&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing:'''&lt;br /&gt;
it(&amp;quot;renders export buttons&amp;quot;, () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Table data={mockData} columns={mockColumns} /&amp;gt;);&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to CSV&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to Excel&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
=== 4.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const [lastUpdated, setLastUpdated] = useState&amp;lt;Date | null&amp;gt;(null);&lt;br /&gt;
&lt;br /&gt;
const refreshTableData = () =&amp;gt; {&lt;br /&gt;
    setLastUpdated(new Date());&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
=== 5.Extending toggle options === &lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
While the heat map provides a great visual representation of the users feedback, with the addition of some 'toggles' we can better idea of the different values. Currently, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: old_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
In this current mode, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_opened.png|650px]]&lt;br /&gt;
&lt;br /&gt;
In the updated version, since more toggle options were added, there is now a heat map option menu, that can be opened and closed. When open, there are 4 different checkboxes to check from that each provide their own way of helping the student better analyze their team grade. When the checkbox are checked, it will add a column to the heat map for the corresponding criteria.&lt;br /&gt;
&lt;br /&gt;
When menu is closed:&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_closed.png|300px]]&lt;br /&gt;
&lt;br /&gt;
==== Supporting Code for Toggle Options ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
Here is the supporting code for the 3 new toggle options, showToggle10WordComments, showToggle20WordComments, and showToggleCustomWordComment are all boolean values that if their state is set to true filter and count reviews based on the properties of their comments. When they're set to true, it will first ensure that the comments are defined as strings and not undefined (since a user can leave a review without providing a comment), it will then filter over the reviews array within a row and filter and return the total number of comments that meet the respective criteria.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' Custom Feature Toggle '''&lt;br /&gt;
&lt;br /&gt;
[[File: simon_custom_checkbox_clicked.png|500px]]&lt;br /&gt;
&lt;br /&gt;
In the Heat Map Option panel, there is a custom checkbox, that when clicked, will allow the users to use the arrow to search within the comments to see how many are &amp;gt;= the input value.&lt;br /&gt;
&lt;br /&gt;
==== Supporting Code ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
In the panel, when the checkbox is clicked, it will update the state for showToggleCustomWordComment to be true, which will then render what can be seen in the previous screenshot. When using the input element, since you can use your keyboard to delete the value and type it in, when you delete the value, when it makes the onChange callback, the current empty string will be based to the inputValue set state giving it a NaN value, so if the onChange is an empty string it will set the value back to 0, which is what the confirmInputValue function is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTableRow.tsx&lt;br /&gt;
&lt;br /&gt;
=== 6.Refactoring Code === &lt;br /&gt;
We will work on refactoring some of the code, for example, changing naming conventions along with making sure SOLID principles are being used.&lt;br /&gt;
&lt;br /&gt;
==== Refactoring code 1 ====&lt;br /&gt;
Updated naming convention for a toggle option&lt;br /&gt;
&lt;br /&gt;
Previous:unclear state variable name with no comment&lt;br /&gt;
&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File: supporting_code5.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Refactored: Added a comment to explain what the state was as well as changing the variable name to be more direct.&lt;br /&gt;
[[File: supporting_code4.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* src/pages/ViewTeamGrades/App.tsx&lt;br /&gt;
* src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagram ==&lt;br /&gt;
&lt;br /&gt;
The use case diagram for the &amp;quot;view-team-grades&amp;quot; page after clicking &amp;quot;Grades View&amp;quot; in Expertiza highlights various interactions with the UI. Here's a general outline of possible actors and use cases:&lt;br /&gt;
&lt;br /&gt;
=== Actors: ===&lt;br /&gt;
&lt;br /&gt;
* Student - Primarily interacts with the UI to view all the grading details for an assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases: ===&lt;br /&gt;
 &lt;br /&gt;
* View detailed grade of a particular assignment - Including assignment name, team name, average score, etc.&lt;br /&gt;
* Show Submission - This link redirects the student to a new page where the student can see his/her submission details.&lt;br /&gt;
* Show Stats - This link redirects the student to a new page where the student can see grading statistics.&lt;br /&gt;
* Submitted Work - This table shows the average and range of submitted work grades. &lt;br /&gt;
**Show Reviews - This link located in the &amp;quot;Submitted Work&amp;quot; table redirects the student to the page that renders all the reviews that the student obtained from his/her peers.&lt;br /&gt;
* Author Feedback - This table shows the average and range of author feedback for the submitted work. &lt;br /&gt;
**Show Author Feedback - This link located in the &amp;quot;Author Feedback&amp;quot; table redirects the student to the page that renders the author feedback that the student obtained after writing a review.&lt;br /&gt;
* Teammate Review - This table shows the average and range of teammate reviews for the submitted work.&lt;br /&gt;
* Back - Link that enables the student to go back to the main page&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[File: yusufov_d2.png |750px|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
To validate the newly designed &amp;quot;View Submissions&amp;quot; page's functionality, usability, and performance while meeting the goals of clarity, consistency, flexibility, and intuitivenes. &lt;br /&gt;
&lt;br /&gt;
=== Testing Scope ===&lt;br /&gt;
1. Component Validation&lt;br /&gt;
* Test individual React components like ReviewTable.tsx and Statistics.tsx.&lt;br /&gt;
2. API Integration&lt;br /&gt;
* Verify API calls using useAPI.ts to ensure seamless backend integration.&lt;br /&gt;
3. Dynamic Features&lt;br /&gt;
* Test real-time updates (e.g., &amp;quot;Last Updated&amp;quot; timestamps).&lt;br /&gt;
&lt;br /&gt;
=== Test Cases: ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Test Case ID&lt;br /&gt;
! Test Description&lt;br /&gt;
! Expected Outcome&lt;br /&gt;
! Priority&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
| TC001&lt;br /&gt;
| Verify assignment name display&lt;br /&gt;
| Assignment names appear accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC002&lt;br /&gt;
| Validate &amp;quot;Show Stats&amp;quot; link&lt;br /&gt;
| Redirects to accurate grading statistics page.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC003&lt;br /&gt;
| Test pagination in tables&lt;br /&gt;
| Pagination works correctly for large datasets.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC004&lt;br /&gt;
| Test table export functionality&lt;br /&gt;
| CSV and Excel files match table content accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC005&lt;br /&gt;
| Validate data rendering&lt;br /&gt;
| Tables display data using mock files like `dummyData.json`.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC006&lt;br /&gt;
| Test error handling for missing data&lt;br /&gt;
| UI displays appropriate placeholders or messages for empty datasets.&lt;br /&gt;
| Low&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC007&lt;br /&gt;
| Verify contributor details&lt;br /&gt;
| Names and user IDs are displayed accurately.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC008&lt;br /&gt;
| Validate new thresholds for review length&lt;br /&gt;
| Dynamic thresholds for word/character counts update and display correctly.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
&lt;br /&gt;
Unit Testing:&lt;br /&gt;
*Write tests for individual components like ReviewTable using Jest.&lt;br /&gt;
*Validate utility functions in utils.ts.&lt;br /&gt;
&lt;br /&gt;
Integration Testing:&lt;br /&gt;
* Test the interaction between App.tsx and its child components.&lt;br /&gt;
* Validate API responses using axios_client.ts.&lt;br /&gt;
&lt;br /&gt;
Performance Testing:&lt;br /&gt;
* Simulate exporting large datasets to assess system performance.&lt;br /&gt;
* Measure response times for table rendering with dummyData.json.&lt;br /&gt;
&lt;br /&gt;
Accessibility Testing:&lt;br /&gt;
*Test keyboard navigation and WCAG 2.1 compliance.&lt;br /&gt;
&lt;br /&gt;
== Actual Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for ReviewTable using Jest === &lt;br /&gt;
&lt;br /&gt;
*The ReviewTable component is validated using the Jest and React Testing Libraries. Running tests on the ReviewTable component allowed us to determine whether the component rendered without crashing by utilizing the render function provided by the React Testing Library. The ReviewTable component was wrapped inside a Router component imported from react-router-dom, to establish the necessary routing context for components that rely on React Router. This configuration allows the test to simulate the environment in which the component operates accurately. Overall, the test file serves as a quality assurance measure, verifying that the ReviewTable component can render successfully and integrate correctly with the React Router.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.test.tsx ReviewTable.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render} from '@testing-library/react';&lt;br /&gt;
import { BrowserRouter as Router } from 'react-router-dom';&lt;br /&gt;
import ReviewTable from './ReviewTable';&lt;br /&gt;
&lt;br /&gt;
describe('ReviewTable component', () =&amp;gt; {&lt;br /&gt;
    test('renders without crashing', () =&amp;gt; {&lt;br /&gt;
        render(&lt;br /&gt;
          &amp;lt;Router&amp;gt; {/* Wrap your component with Router */}&lt;br /&gt;
            &amp;lt;ReviewTable /&amp;gt;&lt;br /&gt;
          &amp;lt;/Router&amp;gt;&lt;br /&gt;
        );&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
[[File: loyda_review_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for Statistics Component using Jest === &lt;br /&gt;
&lt;br /&gt;
*The Statistics component is validated using the Jest and React Testing Libraries. It employs the Jest and React Testing Library for testing purposes, along with the jest-dom library for custom assertions. The first test &amp;quot;renders the correct labels&amp;quot; ensures that the statistics table renders the correct labels. The second test &amp;quot;renders correct statistical information for each label&amp;quot; ensures that the statistical information is rendered correctly under each label. Lastly, their test &amp;quot;renders correct links&amp;quot; ensures that all the necessary links are rendered.  Overall, these tests comprehensively evaluate the rendering and functionality of the Statistics component.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statistics.test.tsx Statistics.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render, screen } from '@testing-library/react';&lt;br /&gt;
import '@testing-library/jest-dom/extend-expect'; // Import jest-dom for custom assertions&lt;br /&gt;
import Statistics from './Statistics'; // Import the component to test&lt;br /&gt;
&lt;br /&gt;
describe('Statistics', () =&amp;gt; {&lt;br /&gt;
  test('renders the correct labels', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('columnheader', { name: 'Submitted Work' });&lt;br /&gt;
    const element_2 = screen.getByRole('columnheader', { name: 'Author Feedback' });&lt;br /&gt;
    const element_3 = screen.getByRole('columnheader', { name: 'Teammate Review' });&lt;br /&gt;
    const element_4 = screen.getByRole('columnheader', { name: 'Contributor' });&lt;br /&gt;
    &lt;br /&gt;
    const element_5 = screen.getAllByText(/Average/i);&lt;br /&gt;
    const element_6 = screen.getAllByText(/Range/i);&lt;br /&gt;
    const element_7 = screen.getByRole('columnheader', { name: 'Final Score' });&lt;br /&gt;
&lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_6[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct statistical information for each label', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('cell', { name: 'ssshah26 (Siddharth Shah)' });&lt;br /&gt;
    const element_2 = screen.getByRole('cell', { name: 'Show Reviews (20)' });&lt;br /&gt;
    const element_3 = screen.getByRole('cell', { name: '99.99% - 100%' });&lt;br /&gt;
    const element_4 = screen.getByRole('cell', { name: '96.67 Show Author Feedback (10)' });&lt;br /&gt;
    const element_5 = screen.getByRole('cell', { name: '87% - 100%' });&lt;br /&gt;
    const element_6 = screen.getByRole('cell', { name: '4.64' });&lt;br /&gt;
    const element_7 = screen.getByRole('cell', { name: '90% - 100%' });&lt;br /&gt;
    const element_8 = screen.getByRole('cell', { name: '75% (in Finished)' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5).toBeInTheDocument();&lt;br /&gt;
    expect(element_6).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
    expect(element_8).toBeInTheDocument();&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct links', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('link', { name: 'show stats' });&lt;br /&gt;
    const element_2 = screen.getByRole('link', { name: 'ssshah26' });&lt;br /&gt;
    const element_3 = screen.getByRole('link', { name: 'Show Reviews' });&lt;br /&gt;
    const element_4 = screen.getByRole('link', { name: 'Show Author Feedback' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_statistics_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
* As a student I want to check all grading details of an assignment so that I can know my grade.&lt;br /&gt;
* As a student I want to see my submission of an assignment so that I can check what was submitted for a given assignment.&lt;br /&gt;
* As a student I want to see the names of my group team members so that I can know who I worked with.&lt;br /&gt;
* As a student I want to see the statistics of my grades so that I know my grade distribution.&lt;br /&gt;
* As a student I want to see if I got any late penalties so that I can know whether I got deducted points or not.&lt;br /&gt;
* As a student I want to have a way to view all the reviews that I got for the assignment so that I can read the viewer's responses.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This design document introduces a step-by-step plan for updating the &amp;quot;view-team-grades&amp;quot; page on Expertiza, aiming for a user interface that is visually appealing and simple. Using React and TypeScript, the goal is to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. A clear and flexible UI design makes it not only simple to maintain but also flexible enough for future upgrades. &lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_new_menu_opened.png&amp;diff=160803</id>
		<title>File:Simon new menu opened.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_new_menu_opened.png&amp;diff=160803"/>
		<updated>2024-12-04T08:43:49Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: Sgetahu uploaded a new version of File:Simon new menu opened.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160802</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160802"/>
		<updated>2024-12-04T08:37:19Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Supporting Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible and Actual Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of statistics table: &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
The statistics table that encompasses the &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes. The changes are highlighted below.&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make it easier to read and understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
The two proposed changes highlighted above were combined to create a new statistics table. Each of the 2 proposed changes introduces good mechanisms for achieving clarity and delivering a visually appealing statistics table to the user. Below is a snapshot of the new statistics table. Notice how easy it is to read and follow the details in the table as opposed to the original table.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/Statistics.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statisticstsx Statistics.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 2. Change the Location and Format of Team Member List === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
The team member list is a type of information that should be readily available to the user. Instead, it is placed almost at the bottom of the page. Also, the font size is really small which makes it difficult to locate and read. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the &amp;quot;RoundSelector.tsx&amp;quot; file contains a function and its main purpose is to select the review round. However, its function is also to display the team member list. This violates the single responsibility principle. To fix this issue and allow the &amp;quot;RoundSelector&amp;quot; function to perform one function only, which in this case is to select the review round, it would be wise to move the code to gather and display the team information elsewhere — most likely inside the ReviewTable.tsx file.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of where the team member list is located in the UI. The team member list is outlined in red for visibility:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Notice how small the font size is. Also, the team list should be located at the beginning of the page because it is part of the basic information that should be rendered first.&lt;br /&gt;
&lt;br /&gt;
The current code to gather and display the team member list is located inside the &amp;quot;RoundSelector.tsx&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3b.png|450px]]&lt;br /&gt;
&lt;br /&gt;
Our goal is to change the location of the code snippets that are outlined in red to another location. This change will allow the RoundSelector function to only focus on selecting the review &amp;quot;Rounds&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Place the team list at the top of the page '''  &lt;br /&gt;
The possible location of the team list will be in between the &amp;quot;Team&amp;quot; and &amp;quot;Average peer review score&amp;quot; information. The text format will also be changed. A larger text size will be introduced. These changes will allow the user to locate the list of the names of his/her team.&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Change the location of the code that gathers and displays the team list elsewhere '''&lt;br /&gt;
Changing the location of the code from the &amp;quot;RoundSelector.tsx&amp;quot; file to the &amp;quot;ReviewTable.tsx&amp;quot; file would allow us to fix the violation of the single responsibility principle in &amp;quot;RoundSelector.tsx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
Below is a screenshot of the new location of the team member list outlined in red for visibility. Notice that the team member list is easy to locate as well as easy to read. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Also, we changed the code to gather and display the team member list in the &amp;quot;ReviewTable.tsx&amp;quot; file. The new code snippets added are outlined in red for visibility&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3d.png]]&lt;br /&gt;
&lt;br /&gt;
The new &amp;quot;RoundSelector.tsx&amp;quot; contains the function that is ONLY focussed on selecting the review &amp;quot;Round&amp;quot; and thus obeys the single responsibility principle. A snapshot of the new function is provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3e.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/RoundSelector.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/RoundSelelctor.tsx RoundSelector.tsx]&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.tsx ReviewTable.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 3.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Export buttons for CSV and Excel are located below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Utilizes the SheetJS (xlsx) library to generate exportable files. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. File structure matches the table's visible data. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const exportTableData = (format: &amp;quot;csv&amp;quot; | &amp;quot;xlsx&amp;quot;) =&amp;gt; {&lt;br /&gt;
    const tableData = initialData.map((row) =&amp;gt; {&lt;br /&gt;
        const rowData: Record&amp;lt;string, any&amp;gt; = {};&lt;br /&gt;
        columns.forEach((col) =&amp;gt; {&lt;br /&gt;
            const accessor = col.id; // Use column `id` for keys&lt;br /&gt;
            if (accessor) {&lt;br /&gt;
                rowData[accessor] = row[accessor];&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
        return rowData;&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    const worksheet = XLSX.utils.json_to_sheet(tableData);&lt;br /&gt;
    const workbook = XLSX.utils.book_new();&lt;br /&gt;
    XLSX.utils.book_append_sheet(workbook, worksheet, &amp;quot;TableData&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    const fileType = format === &amp;quot;csv&amp;quot; ? &amp;quot;csv&amp;quot; : &amp;quot;xlsx&amp;quot;;&lt;br /&gt;
    XLSX.writeFile(workbook, `table_data.${fileType}`);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Export Buttons in the UI:'''&lt;br /&gt;
&amp;lt;div style={{ marginTop: &amp;quot;10px&amp;quot; }}&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;csv&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary me-2&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to CSV&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;xlsx&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to Excel&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing:'''&lt;br /&gt;
it(&amp;quot;renders export buttons&amp;quot;, () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Table data={mockData} columns={mockColumns} /&amp;gt;);&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to CSV&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to Excel&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
=== 4.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const [lastUpdated, setLastUpdated] = useState&amp;lt;Date | null&amp;gt;(null);&lt;br /&gt;
&lt;br /&gt;
const refreshTableData = () =&amp;gt; {&lt;br /&gt;
    setLastUpdated(new Date());&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
=== 5.Extending toggle options === &lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
While the heat map provides a great visual representation of the users feedback, with the addition of some 'toggles' we can better idea of the different values. Currently, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: old_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
In this current mode, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_opened.png|650px]]&lt;br /&gt;
&lt;br /&gt;
In the updated version, since more toggle options were added, there is now a heat map option menu, that can be opened and closed. When open, there are 4 different checkboxes to check from that each provide their own way of helping the student better analyze their team grade.&lt;br /&gt;
&lt;br /&gt;
When menu is closed:&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_closed.png|300px]]&lt;br /&gt;
&lt;br /&gt;
==== Supporting Code for Toggle Options ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
Here is the supporting code for the 3 new toggle options, showToggle10WordComments, showToggle20WordComments, and showToggleCustomWordComment are all boolean values that if their state is set to true filter and count reviews based on the properties of their comments. When they're set to true, it will first ensure that the comments are defined as strings and not undefined (since a user can leave a review without providing a comment), it will then filter over the reviews array within a row and filter and return the total number of comments that meet the respective criteria.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' Custom Feature Toggle '''&lt;br /&gt;
&lt;br /&gt;
[[File: simon_custom_checkbox_clicked.png|500px]]&lt;br /&gt;
&lt;br /&gt;
In the Heat Map Option panel, there is a custom checkbox, that when clicked, will allow the users to use the arrow to search within the comments to see how many are &amp;gt;= the input value.&lt;br /&gt;
&lt;br /&gt;
==== Supporting Code ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
In the panel, when the checkbox is clicked, it will update the state for showToggleCustomWordComment to be true, which will then render what can be seen in the previous screenshot. When using the input element, since you can use your keyboard to delete the value and type it in, when you delete the value, when it makes the onChange callback, the current empty string will be based to the inputValue set state giving it a NaN value, so if the onChange is an empty string it will set the value back to 0, which is what the confirmInputValue function is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTableRow.tsx&lt;br /&gt;
&lt;br /&gt;
=== 6.Refactoring Code === &lt;br /&gt;
We will work on refactoring some of the code, for example, changing naming conventions along with making sure SOLID principles are being used.&lt;br /&gt;
&lt;br /&gt;
==== Refactoring code 1 ====&lt;br /&gt;
Updated naming convention for a toggle option&lt;br /&gt;
&lt;br /&gt;
Previous:unclear state variable name with no comment&lt;br /&gt;
&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File: supporting_code5.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Refactored: Added a comment to explain what the state was as well as changing the variable name to be more direct.&lt;br /&gt;
[[File: supporting_code4.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* src/pages/ViewTeamGrades/App.tsx&lt;br /&gt;
* src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagram ==&lt;br /&gt;
&lt;br /&gt;
The use case diagram for the &amp;quot;view-team-grades&amp;quot; page after clicking &amp;quot;Grades View&amp;quot; in Expertiza highlights various interactions with the UI. Here's a general outline of possible actors and use cases:&lt;br /&gt;
&lt;br /&gt;
=== Actors: ===&lt;br /&gt;
&lt;br /&gt;
* Student - Primarily interacts with the UI to view all the grading details for an assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases: ===&lt;br /&gt;
 &lt;br /&gt;
* View detailed grade of a particular assignment - Including assignment name, team name, average score, etc.&lt;br /&gt;
* Show Submission - This link redirects the student to a new page where the student can see his/her submission details.&lt;br /&gt;
* Show Stats - This link redirects the student to a new page where the student can see grading statistics.&lt;br /&gt;
* Submitted Work - This table shows the average and range of submitted work grades. &lt;br /&gt;
**Show Reviews - This link located in the &amp;quot;Submitted Work&amp;quot; table redirects the student to the page that renders all the reviews that the student obtained from his/her peers.&lt;br /&gt;
* Author Feedback - This table shows the average and range of author feedback for the submitted work. &lt;br /&gt;
**Show Author Feedback - This link located in the &amp;quot;Author Feedback&amp;quot; table redirects the student to the page that renders the author feedback that the student obtained after writing a review.&lt;br /&gt;
* Teammate Review - This table shows the average and range of teammate reviews for the submitted work.&lt;br /&gt;
* Back - Link that enables the student to go back to the main page&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[File: yusufov_d2.png |750px|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
To validate the newly designed &amp;quot;View Submissions&amp;quot; page's functionality, usability, and performance while meeting the goals of clarity, consistency, flexibility, and intuitivenes. &lt;br /&gt;
&lt;br /&gt;
=== Testing Scope ===&lt;br /&gt;
1. Component Validation&lt;br /&gt;
* Test individual React components like ReviewTable.tsx and Statistics.tsx.&lt;br /&gt;
2. API Integration&lt;br /&gt;
* Verify API calls using useAPI.ts to ensure seamless backend integration.&lt;br /&gt;
3. Dynamic Features&lt;br /&gt;
* Test real-time updates (e.g., &amp;quot;Last Updated&amp;quot; timestamps).&lt;br /&gt;
&lt;br /&gt;
=== Test Cases: ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Test Case ID&lt;br /&gt;
! Test Description&lt;br /&gt;
! Expected Outcome&lt;br /&gt;
! Priority&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
| TC001&lt;br /&gt;
| Verify assignment name display&lt;br /&gt;
| Assignment names appear accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC002&lt;br /&gt;
| Validate &amp;quot;Show Stats&amp;quot; link&lt;br /&gt;
| Redirects to accurate grading statistics page.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC003&lt;br /&gt;
| Test pagination in tables&lt;br /&gt;
| Pagination works correctly for large datasets.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC004&lt;br /&gt;
| Test table export functionality&lt;br /&gt;
| CSV and Excel files match table content accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC005&lt;br /&gt;
| Validate data rendering&lt;br /&gt;
| Tables display data using mock files like `dummyData.json`.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC006&lt;br /&gt;
| Test error handling for missing data&lt;br /&gt;
| UI displays appropriate placeholders or messages for empty datasets.&lt;br /&gt;
| Low&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC007&lt;br /&gt;
| Verify contributor details&lt;br /&gt;
| Names and user IDs are displayed accurately.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC008&lt;br /&gt;
| Validate new thresholds for review length&lt;br /&gt;
| Dynamic thresholds for word/character counts update and display correctly.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
&lt;br /&gt;
Unit Testing:&lt;br /&gt;
*Write tests for individual components like ReviewTable using Jest.&lt;br /&gt;
*Validate utility functions in utils.ts.&lt;br /&gt;
&lt;br /&gt;
Integration Testing:&lt;br /&gt;
* Test the interaction between App.tsx and its child components.&lt;br /&gt;
* Validate API responses using axios_client.ts.&lt;br /&gt;
&lt;br /&gt;
Performance Testing:&lt;br /&gt;
* Simulate exporting large datasets to assess system performance.&lt;br /&gt;
* Measure response times for table rendering with dummyData.json.&lt;br /&gt;
&lt;br /&gt;
Accessibility Testing:&lt;br /&gt;
*Test keyboard navigation and WCAG 2.1 compliance.&lt;br /&gt;
&lt;br /&gt;
== Actual Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for ReviewTable using Jest === &lt;br /&gt;
&lt;br /&gt;
*The ReviewTable component is validated using the Jest and React Testing Libraries. Running tests on the ReviewTable component allowed us to determine whether the component rendered without crashing by utilizing the render function provided by the React Testing Library. The ReviewTable component was wrapped inside a Router component imported from react-router-dom, to establish the necessary routing context for components that rely on React Router. This configuration allows the test to simulate the environment in which the component operates accurately. Overall, the test file serves as a quality assurance measure, verifying that the ReviewTable component can render successfully and integrate correctly with the React Router.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.test.tsx ReviewTable.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render} from '@testing-library/react';&lt;br /&gt;
import { BrowserRouter as Router } from 'react-router-dom';&lt;br /&gt;
import ReviewTable from './ReviewTable';&lt;br /&gt;
&lt;br /&gt;
describe('ReviewTable component', () =&amp;gt; {&lt;br /&gt;
    test('renders without crashing', () =&amp;gt; {&lt;br /&gt;
        render(&lt;br /&gt;
          &amp;lt;Router&amp;gt; {/* Wrap your component with Router */}&lt;br /&gt;
            &amp;lt;ReviewTable /&amp;gt;&lt;br /&gt;
          &amp;lt;/Router&amp;gt;&lt;br /&gt;
        );&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
[[File: loyda_review_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for Statistics Component using Jest === &lt;br /&gt;
&lt;br /&gt;
*The Statistics component is validated using the Jest and React Testing Libraries. It employs the Jest and React Testing Library for testing purposes, along with the jest-dom library for custom assertions. The first test &amp;quot;renders the correct labels&amp;quot; ensures that the statistics table renders the correct labels. The second test &amp;quot;renders correct statistical information for each label&amp;quot; ensures that the statistical information is rendered correctly under each label. Lastly, their test &amp;quot;renders correct links&amp;quot; ensures that all the necessary links are rendered.  Overall, these tests comprehensively evaluate the rendering and functionality of the Statistics component.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statistics.test.tsx Statistics.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render, screen } from '@testing-library/react';&lt;br /&gt;
import '@testing-library/jest-dom/extend-expect'; // Import jest-dom for custom assertions&lt;br /&gt;
import Statistics from './Statistics'; // Import the component to test&lt;br /&gt;
&lt;br /&gt;
describe('Statistics', () =&amp;gt; {&lt;br /&gt;
  test('renders the correct labels', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('columnheader', { name: 'Submitted Work' });&lt;br /&gt;
    const element_2 = screen.getByRole('columnheader', { name: 'Author Feedback' });&lt;br /&gt;
    const element_3 = screen.getByRole('columnheader', { name: 'Teammate Review' });&lt;br /&gt;
    const element_4 = screen.getByRole('columnheader', { name: 'Contributor' });&lt;br /&gt;
    &lt;br /&gt;
    const element_5 = screen.getAllByText(/Average/i);&lt;br /&gt;
    const element_6 = screen.getAllByText(/Range/i);&lt;br /&gt;
    const element_7 = screen.getByRole('columnheader', { name: 'Final Score' });&lt;br /&gt;
&lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_6[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct statistical information for each label', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('cell', { name: 'ssshah26 (Siddharth Shah)' });&lt;br /&gt;
    const element_2 = screen.getByRole('cell', { name: 'Show Reviews (20)' });&lt;br /&gt;
    const element_3 = screen.getByRole('cell', { name: '99.99% - 100%' });&lt;br /&gt;
    const element_4 = screen.getByRole('cell', { name: '96.67 Show Author Feedback (10)' });&lt;br /&gt;
    const element_5 = screen.getByRole('cell', { name: '87% - 100%' });&lt;br /&gt;
    const element_6 = screen.getByRole('cell', { name: '4.64' });&lt;br /&gt;
    const element_7 = screen.getByRole('cell', { name: '90% - 100%' });&lt;br /&gt;
    const element_8 = screen.getByRole('cell', { name: '75% (in Finished)' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5).toBeInTheDocument();&lt;br /&gt;
    expect(element_6).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
    expect(element_8).toBeInTheDocument();&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct links', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('link', { name: 'show stats' });&lt;br /&gt;
    const element_2 = screen.getByRole('link', { name: 'ssshah26' });&lt;br /&gt;
    const element_3 = screen.getByRole('link', { name: 'Show Reviews' });&lt;br /&gt;
    const element_4 = screen.getByRole('link', { name: 'Show Author Feedback' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_statistics_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
* As a student I want to check all grading details of an assignment so that I can know my grade.&lt;br /&gt;
* As a student I want to see my submission of an assignment so that I can check what was submitted for a given assignment.&lt;br /&gt;
* As a student I want to see the names of my group team members so that I can know who I worked with.&lt;br /&gt;
* As a student I want to see the statistics of my grades so that I know my grade distribution.&lt;br /&gt;
* As a student I want to see if I got any late penalties so that I can know whether I got deducted points or not.&lt;br /&gt;
* As a student I want to have a way to view all the reviews that I got for the assignment so that I can read the viewer's responses.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This design document introduces a step-by-step plan for updating the &amp;quot;view-team-grades&amp;quot; page on Expertiza, aiming for a user interface that is visually appealing and simple. Using React and TypeScript, the goal is to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. A clear and flexible UI design makes it not only simple to maintain but also flexible enough for future upgrades. &lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160801</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160801"/>
		<updated>2024-12-04T08:35:14Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Supporting Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible and Actual Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of statistics table: &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
The statistics table that encompasses the &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes. The changes are highlighted below.&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make it easier to read and understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
The two proposed changes highlighted above were combined to create a new statistics table. Each of the 2 proposed changes introduces good mechanisms for achieving clarity and delivering a visually appealing statistics table to the user. Below is a snapshot of the new statistics table. Notice how easy it is to read and follow the details in the table as opposed to the original table.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/Statistics.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statisticstsx Statistics.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 2. Change the Location and Format of Team Member List === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
The team member list is a type of information that should be readily available to the user. Instead, it is placed almost at the bottom of the page. Also, the font size is really small which makes it difficult to locate and read. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the &amp;quot;RoundSelector.tsx&amp;quot; file contains a function and its main purpose is to select the review round. However, its function is also to display the team member list. This violates the single responsibility principle. To fix this issue and allow the &amp;quot;RoundSelector&amp;quot; function to perform one function only, which in this case is to select the review round, it would be wise to move the code to gather and display the team information elsewhere — most likely inside the ReviewTable.tsx file.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of where the team member list is located in the UI. The team member list is outlined in red for visibility:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Notice how small the font size is. Also, the team list should be located at the beginning of the page because it is part of the basic information that should be rendered first.&lt;br /&gt;
&lt;br /&gt;
The current code to gather and display the team member list is located inside the &amp;quot;RoundSelector.tsx&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3b.png|450px]]&lt;br /&gt;
&lt;br /&gt;
Our goal is to change the location of the code snippets that are outlined in red to another location. This change will allow the RoundSelector function to only focus on selecting the review &amp;quot;Rounds&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Place the team list at the top of the page '''  &lt;br /&gt;
The possible location of the team list will be in between the &amp;quot;Team&amp;quot; and &amp;quot;Average peer review score&amp;quot; information. The text format will also be changed. A larger text size will be introduced. These changes will allow the user to locate the list of the names of his/her team.&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Change the location of the code that gathers and displays the team list elsewhere '''&lt;br /&gt;
Changing the location of the code from the &amp;quot;RoundSelector.tsx&amp;quot; file to the &amp;quot;ReviewTable.tsx&amp;quot; file would allow us to fix the violation of the single responsibility principle in &amp;quot;RoundSelector.tsx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
Below is a screenshot of the new location of the team member list outlined in red for visibility. Notice that the team member list is easy to locate as well as easy to read. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Also, we changed the code to gather and display the team member list in the &amp;quot;ReviewTable.tsx&amp;quot; file. The new code snippets added are outlined in red for visibility&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3d.png]]&lt;br /&gt;
&lt;br /&gt;
The new &amp;quot;RoundSelector.tsx&amp;quot; contains the function that is ONLY focussed on selecting the review &amp;quot;Round&amp;quot; and thus obeys the single responsibility principle. A snapshot of the new function is provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3e.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/RoundSelector.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/RoundSelelctor.tsx RoundSelector.tsx]&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.tsx ReviewTable.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 3.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Export buttons for CSV and Excel are located below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Utilizes the SheetJS (xlsx) library to generate exportable files. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. File structure matches the table's visible data. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const exportTableData = (format: &amp;quot;csv&amp;quot; | &amp;quot;xlsx&amp;quot;) =&amp;gt; {&lt;br /&gt;
    const tableData = initialData.map((row) =&amp;gt; {&lt;br /&gt;
        const rowData: Record&amp;lt;string, any&amp;gt; = {};&lt;br /&gt;
        columns.forEach((col) =&amp;gt; {&lt;br /&gt;
            const accessor = col.id; // Use column `id` for keys&lt;br /&gt;
            if (accessor) {&lt;br /&gt;
                rowData[accessor] = row[accessor];&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
        return rowData;&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    const worksheet = XLSX.utils.json_to_sheet(tableData);&lt;br /&gt;
    const workbook = XLSX.utils.book_new();&lt;br /&gt;
    XLSX.utils.book_append_sheet(workbook, worksheet, &amp;quot;TableData&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    const fileType = format === &amp;quot;csv&amp;quot; ? &amp;quot;csv&amp;quot; : &amp;quot;xlsx&amp;quot;;&lt;br /&gt;
    XLSX.writeFile(workbook, `table_data.${fileType}`);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Export Buttons in the UI:'''&lt;br /&gt;
&amp;lt;div style={{ marginTop: &amp;quot;10px&amp;quot; }}&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;csv&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary me-2&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to CSV&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;xlsx&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to Excel&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing:'''&lt;br /&gt;
it(&amp;quot;renders export buttons&amp;quot;, () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Table data={mockData} columns={mockColumns} /&amp;gt;);&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to CSV&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to Excel&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
=== 4.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const [lastUpdated, setLastUpdated] = useState&amp;lt;Date | null&amp;gt;(null);&lt;br /&gt;
&lt;br /&gt;
const refreshTableData = () =&amp;gt; {&lt;br /&gt;
    setLastUpdated(new Date());&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
=== 5.Extending toggle options === &lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
While the heat map provides a great visual representation of the users feedback, with the addition of some 'toggles' we can better idea of the different values. Currently, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: old_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
In this current mode, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_opened.png|650px]]&lt;br /&gt;
&lt;br /&gt;
In the updated version, since more toggle options were added, there is now a heat map option menu, that can be opened and closed. When open, there are 4 different checkboxes to check from that each provide their own way of helping the student better analyze their team grade.&lt;br /&gt;
&lt;br /&gt;
When menu is closed:&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_closed.png|300px]]&lt;br /&gt;
&lt;br /&gt;
==== Supporting Code ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
Here is the supporting code for the 3 new toggle options, showToggle10WordComments, showToggle20WordComments, and showToggleCustomWordComment are all boolean values that if their state is set to true filter and count reviews based on the properties of their comments. When they're set to true, it will first ensure that the comments are defined as strings and not undefined (since a user can leave a review without providing a comment), it will then filter over the reviews array within a row and filter and return the total number of comments that meet the respective criteria.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' Custom Feature Toggle '''&lt;br /&gt;
&lt;br /&gt;
[[File: simon_custom_checkbox_clicked.png|500px]]&lt;br /&gt;
&lt;br /&gt;
In the Heat Map Option panel, there is a custom checkbox, that when clicked, will allow the users to use the arrow to search within the comments to see how many are &amp;gt;= the input value. &lt;br /&gt;
&lt;br /&gt;
==== Supporting Code ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code2.png|500px]]&lt;br /&gt;
&lt;br /&gt;
In the panel, when the checkbox is clicked, it will update the state for showToggleCustomWordComment to be true, which will then render what can be seen in the previous screenshot. When using the input element, since you can use your keyboard to delete the value and type it in, when you delete the value, when it makes the onChange callback, the current empty string will be based to the inputValue set state giving it a NaN value, so if the onChange is an empty string it will set the value back to 0, which is what the confirmInputValue function is doing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTableRow.tsx&lt;br /&gt;
&lt;br /&gt;
=== 6.Refactoring Code === &lt;br /&gt;
We will work on refactoring some of the code, for example, changing naming conventions along with making sure SOLID principles are being used.&lt;br /&gt;
&lt;br /&gt;
==== Refactoring code 1 ====&lt;br /&gt;
Updated naming convention for a toggle option&lt;br /&gt;
&lt;br /&gt;
Previous:unclear state variable name with no comment&lt;br /&gt;
&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File: supporting_code5.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Refactored: Added a comment to explain what the state was as well as changing the variable name to be more direct.&lt;br /&gt;
[[File: supporting_code4.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* src/pages/ViewTeamGrades/App.tsx&lt;br /&gt;
* src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagram ==&lt;br /&gt;
&lt;br /&gt;
The use case diagram for the &amp;quot;view-team-grades&amp;quot; page after clicking &amp;quot;Grades View&amp;quot; in Expertiza highlights various interactions with the UI. Here's a general outline of possible actors and use cases:&lt;br /&gt;
&lt;br /&gt;
=== Actors: ===&lt;br /&gt;
&lt;br /&gt;
* Student - Primarily interacts with the UI to view all the grading details for an assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases: ===&lt;br /&gt;
 &lt;br /&gt;
* View detailed grade of a particular assignment - Including assignment name, team name, average score, etc.&lt;br /&gt;
* Show Submission - This link redirects the student to a new page where the student can see his/her submission details.&lt;br /&gt;
* Show Stats - This link redirects the student to a new page where the student can see grading statistics.&lt;br /&gt;
* Submitted Work - This table shows the average and range of submitted work grades. &lt;br /&gt;
**Show Reviews - This link located in the &amp;quot;Submitted Work&amp;quot; table redirects the student to the page that renders all the reviews that the student obtained from his/her peers.&lt;br /&gt;
* Author Feedback - This table shows the average and range of author feedback for the submitted work. &lt;br /&gt;
**Show Author Feedback - This link located in the &amp;quot;Author Feedback&amp;quot; table redirects the student to the page that renders the author feedback that the student obtained after writing a review.&lt;br /&gt;
* Teammate Review - This table shows the average and range of teammate reviews for the submitted work.&lt;br /&gt;
* Back - Link that enables the student to go back to the main page&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[File: yusufov_d2.png |750px|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
To validate the newly designed &amp;quot;View Submissions&amp;quot; page's functionality, usability, and performance while meeting the goals of clarity, consistency, flexibility, and intuitivenes. &lt;br /&gt;
&lt;br /&gt;
=== Testing Scope ===&lt;br /&gt;
1. Component Validation&lt;br /&gt;
* Test individual React components like ReviewTable.tsx and Statistics.tsx.&lt;br /&gt;
2. API Integration&lt;br /&gt;
* Verify API calls using useAPI.ts to ensure seamless backend integration.&lt;br /&gt;
3. Dynamic Features&lt;br /&gt;
* Test real-time updates (e.g., &amp;quot;Last Updated&amp;quot; timestamps).&lt;br /&gt;
&lt;br /&gt;
=== Test Cases: ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Test Case ID&lt;br /&gt;
! Test Description&lt;br /&gt;
! Expected Outcome&lt;br /&gt;
! Priority&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
| TC001&lt;br /&gt;
| Verify assignment name display&lt;br /&gt;
| Assignment names appear accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC002&lt;br /&gt;
| Validate &amp;quot;Show Stats&amp;quot; link&lt;br /&gt;
| Redirects to accurate grading statistics page.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC003&lt;br /&gt;
| Test pagination in tables&lt;br /&gt;
| Pagination works correctly for large datasets.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC004&lt;br /&gt;
| Test table export functionality&lt;br /&gt;
| CSV and Excel files match table content accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC005&lt;br /&gt;
| Validate data rendering&lt;br /&gt;
| Tables display data using mock files like `dummyData.json`.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC006&lt;br /&gt;
| Test error handling for missing data&lt;br /&gt;
| UI displays appropriate placeholders or messages for empty datasets.&lt;br /&gt;
| Low&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC007&lt;br /&gt;
| Verify contributor details&lt;br /&gt;
| Names and user IDs are displayed accurately.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC008&lt;br /&gt;
| Validate new thresholds for review length&lt;br /&gt;
| Dynamic thresholds for word/character counts update and display correctly.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
&lt;br /&gt;
Unit Testing:&lt;br /&gt;
*Write tests for individual components like ReviewTable using Jest.&lt;br /&gt;
*Validate utility functions in utils.ts.&lt;br /&gt;
&lt;br /&gt;
Integration Testing:&lt;br /&gt;
* Test the interaction between App.tsx and its child components.&lt;br /&gt;
* Validate API responses using axios_client.ts.&lt;br /&gt;
&lt;br /&gt;
Performance Testing:&lt;br /&gt;
* Simulate exporting large datasets to assess system performance.&lt;br /&gt;
* Measure response times for table rendering with dummyData.json.&lt;br /&gt;
&lt;br /&gt;
Accessibility Testing:&lt;br /&gt;
*Test keyboard navigation and WCAG 2.1 compliance.&lt;br /&gt;
&lt;br /&gt;
== Actual Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for ReviewTable using Jest === &lt;br /&gt;
&lt;br /&gt;
*The ReviewTable component is validated using the Jest and React Testing Libraries. Running tests on the ReviewTable component allowed us to determine whether the component rendered without crashing by utilizing the render function provided by the React Testing Library. The ReviewTable component was wrapped inside a Router component imported from react-router-dom, to establish the necessary routing context for components that rely on React Router. This configuration allows the test to simulate the environment in which the component operates accurately. Overall, the test file serves as a quality assurance measure, verifying that the ReviewTable component can render successfully and integrate correctly with the React Router.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.test.tsx ReviewTable.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render} from '@testing-library/react';&lt;br /&gt;
import { BrowserRouter as Router } from 'react-router-dom';&lt;br /&gt;
import ReviewTable from './ReviewTable';&lt;br /&gt;
&lt;br /&gt;
describe('ReviewTable component', () =&amp;gt; {&lt;br /&gt;
    test('renders without crashing', () =&amp;gt; {&lt;br /&gt;
        render(&lt;br /&gt;
          &amp;lt;Router&amp;gt; {/* Wrap your component with Router */}&lt;br /&gt;
            &amp;lt;ReviewTable /&amp;gt;&lt;br /&gt;
          &amp;lt;/Router&amp;gt;&lt;br /&gt;
        );&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
[[File: loyda_review_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for Statistics Component using Jest === &lt;br /&gt;
&lt;br /&gt;
*The Statistics component is validated using the Jest and React Testing Libraries. It employs the Jest and React Testing Library for testing purposes, along with the jest-dom library for custom assertions. The first test &amp;quot;renders the correct labels&amp;quot; ensures that the statistics table renders the correct labels. The second test &amp;quot;renders correct statistical information for each label&amp;quot; ensures that the statistical information is rendered correctly under each label. Lastly, their test &amp;quot;renders correct links&amp;quot; ensures that all the necessary links are rendered.  Overall, these tests comprehensively evaluate the rendering and functionality of the Statistics component.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statistics.test.tsx Statistics.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render, screen } from '@testing-library/react';&lt;br /&gt;
import '@testing-library/jest-dom/extend-expect'; // Import jest-dom for custom assertions&lt;br /&gt;
import Statistics from './Statistics'; // Import the component to test&lt;br /&gt;
&lt;br /&gt;
describe('Statistics', () =&amp;gt; {&lt;br /&gt;
  test('renders the correct labels', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('columnheader', { name: 'Submitted Work' });&lt;br /&gt;
    const element_2 = screen.getByRole('columnheader', { name: 'Author Feedback' });&lt;br /&gt;
    const element_3 = screen.getByRole('columnheader', { name: 'Teammate Review' });&lt;br /&gt;
    const element_4 = screen.getByRole('columnheader', { name: 'Contributor' });&lt;br /&gt;
    &lt;br /&gt;
    const element_5 = screen.getAllByText(/Average/i);&lt;br /&gt;
    const element_6 = screen.getAllByText(/Range/i);&lt;br /&gt;
    const element_7 = screen.getByRole('columnheader', { name: 'Final Score' });&lt;br /&gt;
&lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_6[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct statistical information for each label', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('cell', { name: 'ssshah26 (Siddharth Shah)' });&lt;br /&gt;
    const element_2 = screen.getByRole('cell', { name: 'Show Reviews (20)' });&lt;br /&gt;
    const element_3 = screen.getByRole('cell', { name: '99.99% - 100%' });&lt;br /&gt;
    const element_4 = screen.getByRole('cell', { name: '96.67 Show Author Feedback (10)' });&lt;br /&gt;
    const element_5 = screen.getByRole('cell', { name: '87% - 100%' });&lt;br /&gt;
    const element_6 = screen.getByRole('cell', { name: '4.64' });&lt;br /&gt;
    const element_7 = screen.getByRole('cell', { name: '90% - 100%' });&lt;br /&gt;
    const element_8 = screen.getByRole('cell', { name: '75% (in Finished)' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5).toBeInTheDocument();&lt;br /&gt;
    expect(element_6).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
    expect(element_8).toBeInTheDocument();&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct links', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('link', { name: 'show stats' });&lt;br /&gt;
    const element_2 = screen.getByRole('link', { name: 'ssshah26' });&lt;br /&gt;
    const element_3 = screen.getByRole('link', { name: 'Show Reviews' });&lt;br /&gt;
    const element_4 = screen.getByRole('link', { name: 'Show Author Feedback' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_statistics_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
* As a student I want to check all grading details of an assignment so that I can know my grade.&lt;br /&gt;
* As a student I want to see my submission of an assignment so that I can check what was submitted for a given assignment.&lt;br /&gt;
* As a student I want to see the names of my group team members so that I can know who I worked with.&lt;br /&gt;
* As a student I want to see the statistics of my grades so that I know my grade distribution.&lt;br /&gt;
* As a student I want to see if I got any late penalties so that I can know whether I got deducted points or not.&lt;br /&gt;
* As a student I want to have a way to view all the reviews that I got for the assignment so that I can read the viewer's responses.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This design document introduces a step-by-step plan for updating the &amp;quot;view-team-grades&amp;quot; page on Expertiza, aiming for a user interface that is visually appealing and simple. Using React and TypeScript, the goal is to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. A clear and flexible UI design makes it not only simple to maintain but also flexible enough for future upgrades. &lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_supporting_code2.png&amp;diff=160800</id>
		<title>File:Simon supporting code2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_supporting_code2.png&amp;diff=160800"/>
		<updated>2024-12-04T08:16:46Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_custom_checkbox_clicked.png&amp;diff=160799</id>
		<title>File:Simon custom checkbox clicked.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_custom_checkbox_clicked.png&amp;diff=160799"/>
		<updated>2024-12-04T08:16:32Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160798</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160798"/>
		<updated>2024-12-04T08:12:00Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Actual Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible and Actual Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of statistics table: &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
The statistics table that encompasses the &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes. The changes are highlighted below.&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make it easier to read and understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
The two proposed changes highlighted above were combined to create a new statistics table. Each of the 2 proposed changes introduces good mechanisms for achieving clarity and delivering a visually appealing statistics table to the user. Below is a snapshot of the new statistics table. Notice how easy it is to read and follow the details in the table as opposed to the original table.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/Statistics.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statisticstsx Statistics.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 2. Change the Location and Format of Team Member List === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
The team member list is a type of information that should be readily available to the user. Instead, it is placed almost at the bottom of the page. Also, the font size is really small which makes it difficult to locate and read. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the &amp;quot;RoundSelector.tsx&amp;quot; file contains a function and its main purpose is to select the review round. However, its function is also to display the team member list. This violates the single responsibility principle. To fix this issue and allow the &amp;quot;RoundSelector&amp;quot; function to perform one function only, which in this case is to select the review round, it would be wise to move the code to gather and display the team information elsewhere — most likely inside the ReviewTable.tsx file.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of where the team member list is located in the UI. The team member list is outlined in red for visibility:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Notice how small the font size is. Also, the team list should be located at the beginning of the page because it is part of the basic information that should be rendered first.&lt;br /&gt;
&lt;br /&gt;
The current code to gather and display the team member list is located inside the &amp;quot;RoundSelector.tsx&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3b.png|450px]]&lt;br /&gt;
&lt;br /&gt;
Our goal is to change the location of the code snippets that are outlined in red to another location. This change will allow the RoundSelector function to only focus on selecting the review &amp;quot;Rounds&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Place the team list at the top of the page '''  &lt;br /&gt;
The possible location of the team list will be in between the &amp;quot;Team&amp;quot; and &amp;quot;Average peer review score&amp;quot; information. The text format will also be changed. A larger text size will be introduced. These changes will allow the user to locate the list of the names of his/her team.&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Change the location of the code that gathers and displays the team list elsewhere '''&lt;br /&gt;
Changing the location of the code from the &amp;quot;RoundSelector.tsx&amp;quot; file to the &amp;quot;ReviewTable.tsx&amp;quot; file would allow us to fix the violation of the single responsibility principle in &amp;quot;RoundSelector.tsx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
Below is a screenshot of the new location of the team member list outlined in red for visibility. Notice that the team member list is easy to locate as well as easy to read. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Also, we changed the code to gather and display the team member list in the &amp;quot;ReviewTable.tsx&amp;quot; file. The new code snippets added are outlined in red for visibility&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3d.png]]&lt;br /&gt;
&lt;br /&gt;
The new &amp;quot;RoundSelector.tsx&amp;quot; contains the function that is ONLY focussed on selecting the review &amp;quot;Round&amp;quot; and thus obeys the single responsibility principle. A snapshot of the new function is provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3e.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/RoundSelector.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/RoundSelelctor.tsx RoundSelector.tsx]&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.tsx ReviewTable.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 3.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Export buttons for CSV and Excel are located below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Utilizes the SheetJS (xlsx) library to generate exportable files. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. File structure matches the table's visible data. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const exportTableData = (format: &amp;quot;csv&amp;quot; | &amp;quot;xlsx&amp;quot;) =&amp;gt; {&lt;br /&gt;
    const tableData = initialData.map((row) =&amp;gt; {&lt;br /&gt;
        const rowData: Record&amp;lt;string, any&amp;gt; = {};&lt;br /&gt;
        columns.forEach((col) =&amp;gt; {&lt;br /&gt;
            const accessor = col.id; // Use column `id` for keys&lt;br /&gt;
            if (accessor) {&lt;br /&gt;
                rowData[accessor] = row[accessor];&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
        return rowData;&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    const worksheet = XLSX.utils.json_to_sheet(tableData);&lt;br /&gt;
    const workbook = XLSX.utils.book_new();&lt;br /&gt;
    XLSX.utils.book_append_sheet(workbook, worksheet, &amp;quot;TableData&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    const fileType = format === &amp;quot;csv&amp;quot; ? &amp;quot;csv&amp;quot; : &amp;quot;xlsx&amp;quot;;&lt;br /&gt;
    XLSX.writeFile(workbook, `table_data.${fileType}`);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Export Buttons in the UI:'''&lt;br /&gt;
&amp;lt;div style={{ marginTop: &amp;quot;10px&amp;quot; }}&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;csv&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary me-2&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to CSV&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;xlsx&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to Excel&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing:'''&lt;br /&gt;
it(&amp;quot;renders export buttons&amp;quot;, () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Table data={mockData} columns={mockColumns} /&amp;gt;);&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to CSV&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to Excel&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
=== 4.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const [lastUpdated, setLastUpdated] = useState&amp;lt;Date | null&amp;gt;(null);&lt;br /&gt;
&lt;br /&gt;
const refreshTableData = () =&amp;gt; {&lt;br /&gt;
    setLastUpdated(new Date());&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
=== 5.Extending toggle options === &lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
While the heat map provides a great visual representation of the users feedback, with the addition of some 'toggles' we can better idea of the different values. Currently, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: old_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
In this current mode, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_opened.png|650px]]&lt;br /&gt;
&lt;br /&gt;
In the updated version, since more toggle options were added, there is now a heat map option menu, that can be opened and closed. When open, there are 4 different checkboxes to check from that each provide their own way of helping the student better analyze their team grade.&lt;br /&gt;
&lt;br /&gt;
When menu is closed:&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_closed.png|300px]]&lt;br /&gt;
&lt;br /&gt;
==== Supporting Code ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_closed.png|650px]]&lt;br /&gt;
&lt;br /&gt;
Here is the supporting code for the 3 new toggle options, showToggle10WordComments, showToggle20WordComments, and showToggleCustomWordComment are all boolean values that if their state is set to true filter and count reviews based on the properties of their comments. When they're set to true, it will first ensure that the comments are defined as strings and not undefined (since a user can leave a review without providing a comment), it will then filter over the reviews array within a row and filter and return the total number of comments that meet the respective criteria.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTableRow.tsx&lt;br /&gt;
&lt;br /&gt;
=== 6.Refactoring Code === &lt;br /&gt;
We will work on refactoring some of the code, for example, changing naming conventions along with making sure SOLID principles are being used.&lt;br /&gt;
&lt;br /&gt;
==== Refactoring code 1 ====&lt;br /&gt;
Updated naming convention for a toggle option&lt;br /&gt;
&lt;br /&gt;
Previous:unclear state variable name with no comment&lt;br /&gt;
&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File: supporting_code5.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Refactored: Added a comment to explain what the state was as well as changing the variable name to be more direct.&lt;br /&gt;
[[File: supporting_code4.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* src/pages/ViewTeamGrades/App.tsx&lt;br /&gt;
* src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagram ==&lt;br /&gt;
&lt;br /&gt;
The use case diagram for the &amp;quot;view-team-grades&amp;quot; page after clicking &amp;quot;Grades View&amp;quot; in Expertiza highlights various interactions with the UI. Here's a general outline of possible actors and use cases:&lt;br /&gt;
&lt;br /&gt;
=== Actors: ===&lt;br /&gt;
&lt;br /&gt;
* Student - Primarily interacts with the UI to view all the grading details for an assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases: ===&lt;br /&gt;
 &lt;br /&gt;
* View detailed grade of a particular assignment - Including assignment name, team name, average score, etc.&lt;br /&gt;
* Show Submission - This link redirects the student to a new page where the student can see his/her submission details.&lt;br /&gt;
* Show Stats - This link redirects the student to a new page where the student can see grading statistics.&lt;br /&gt;
* Submitted Work - This table shows the average and range of submitted work grades. &lt;br /&gt;
**Show Reviews - This link located in the &amp;quot;Submitted Work&amp;quot; table redirects the student to the page that renders all the reviews that the student obtained from his/her peers.&lt;br /&gt;
* Author Feedback - This table shows the average and range of author feedback for the submitted work. &lt;br /&gt;
**Show Author Feedback - This link located in the &amp;quot;Author Feedback&amp;quot; table redirects the student to the page that renders the author feedback that the student obtained after writing a review.&lt;br /&gt;
* Teammate Review - This table shows the average and range of teammate reviews for the submitted work.&lt;br /&gt;
* Back - Link that enables the student to go back to the main page&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[File: yusufov_d2.png |750px|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
To validate the newly designed &amp;quot;View Submissions&amp;quot; page's functionality, usability, and performance while meeting the goals of clarity, consistency, flexibility, and intuitivenes. &lt;br /&gt;
&lt;br /&gt;
=== Testing Scope ===&lt;br /&gt;
1. Component Validation&lt;br /&gt;
* Test individual React components like ReviewTable.tsx and Statistics.tsx.&lt;br /&gt;
2. API Integration&lt;br /&gt;
* Verify API calls using useAPI.ts to ensure seamless backend integration.&lt;br /&gt;
3. Dynamic Features&lt;br /&gt;
* Test real-time updates (e.g., &amp;quot;Last Updated&amp;quot; timestamps).&lt;br /&gt;
&lt;br /&gt;
=== Test Cases: ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Test Case ID&lt;br /&gt;
! Test Description&lt;br /&gt;
! Expected Outcome&lt;br /&gt;
! Priority&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
| TC001&lt;br /&gt;
| Verify assignment name display&lt;br /&gt;
| Assignment names appear accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC002&lt;br /&gt;
| Validate &amp;quot;Show Stats&amp;quot; link&lt;br /&gt;
| Redirects to accurate grading statistics page.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC003&lt;br /&gt;
| Test pagination in tables&lt;br /&gt;
| Pagination works correctly for large datasets.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC004&lt;br /&gt;
| Test table export functionality&lt;br /&gt;
| CSV and Excel files match table content accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC005&lt;br /&gt;
| Validate data rendering&lt;br /&gt;
| Tables display data using mock files like `dummyData.json`.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC006&lt;br /&gt;
| Test error handling for missing data&lt;br /&gt;
| UI displays appropriate placeholders or messages for empty datasets.&lt;br /&gt;
| Low&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC007&lt;br /&gt;
| Verify contributor details&lt;br /&gt;
| Names and user IDs are displayed accurately.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC008&lt;br /&gt;
| Validate new thresholds for review length&lt;br /&gt;
| Dynamic thresholds for word/character counts update and display correctly.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
&lt;br /&gt;
Unit Testing:&lt;br /&gt;
*Write tests for individual components like ReviewTable using Jest.&lt;br /&gt;
*Validate utility functions in utils.ts.&lt;br /&gt;
&lt;br /&gt;
Integration Testing:&lt;br /&gt;
* Test the interaction between App.tsx and its child components.&lt;br /&gt;
* Validate API responses using axios_client.ts.&lt;br /&gt;
&lt;br /&gt;
Performance Testing:&lt;br /&gt;
* Simulate exporting large datasets to assess system performance.&lt;br /&gt;
* Measure response times for table rendering with dummyData.json.&lt;br /&gt;
&lt;br /&gt;
Accessibility Testing:&lt;br /&gt;
*Test keyboard navigation and WCAG 2.1 compliance.&lt;br /&gt;
&lt;br /&gt;
== Actual Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for ReviewTable using Jest === &lt;br /&gt;
&lt;br /&gt;
*The ReviewTable component is validated using the Jest and React Testing Libraries. Running tests on the ReviewTable component allowed us to determine whether the component rendered without crashing by utilizing the render function provided by the React Testing Library. The ReviewTable component was wrapped inside a Router component imported from react-router-dom, to establish the necessary routing context for components that rely on React Router. This configuration allows the test to simulate the environment in which the component operates accurately. Overall, the test file serves as a quality assurance measure, verifying that the ReviewTable component can render successfully and integrate correctly with the React Router.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.test.tsx ReviewTable.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render} from '@testing-library/react';&lt;br /&gt;
import { BrowserRouter as Router } from 'react-router-dom';&lt;br /&gt;
import ReviewTable from './ReviewTable';&lt;br /&gt;
&lt;br /&gt;
describe('ReviewTable component', () =&amp;gt; {&lt;br /&gt;
    test('renders without crashing', () =&amp;gt; {&lt;br /&gt;
        render(&lt;br /&gt;
          &amp;lt;Router&amp;gt; {/* Wrap your component with Router */}&lt;br /&gt;
            &amp;lt;ReviewTable /&amp;gt;&lt;br /&gt;
          &amp;lt;/Router&amp;gt;&lt;br /&gt;
        );&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
[[File: loyda_review_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for Statistics Component using Jest === &lt;br /&gt;
&lt;br /&gt;
*The Statistics component is validated using the Jest and React Testing Libraries. It employs the Jest and React Testing Library for testing purposes, along with the jest-dom library for custom assertions. The first test &amp;quot;renders the correct labels&amp;quot; ensures that the statistics table renders the correct labels. The second test &amp;quot;renders correct statistical information for each label&amp;quot; ensures that the statistical information is rendered correctly under each label. Lastly, their test &amp;quot;renders correct links&amp;quot; ensures that all the necessary links are rendered.  Overall, these tests comprehensively evaluate the rendering and functionality of the Statistics component.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statistics.test.tsx Statistics.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render, screen } from '@testing-library/react';&lt;br /&gt;
import '@testing-library/jest-dom/extend-expect'; // Import jest-dom for custom assertions&lt;br /&gt;
import Statistics from './Statistics'; // Import the component to test&lt;br /&gt;
&lt;br /&gt;
describe('Statistics', () =&amp;gt; {&lt;br /&gt;
  test('renders the correct labels', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('columnheader', { name: 'Submitted Work' });&lt;br /&gt;
    const element_2 = screen.getByRole('columnheader', { name: 'Author Feedback' });&lt;br /&gt;
    const element_3 = screen.getByRole('columnheader', { name: 'Teammate Review' });&lt;br /&gt;
    const element_4 = screen.getByRole('columnheader', { name: 'Contributor' });&lt;br /&gt;
    &lt;br /&gt;
    const element_5 = screen.getAllByText(/Average/i);&lt;br /&gt;
    const element_6 = screen.getAllByText(/Range/i);&lt;br /&gt;
    const element_7 = screen.getByRole('columnheader', { name: 'Final Score' });&lt;br /&gt;
&lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_6[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct statistical information for each label', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('cell', { name: 'ssshah26 (Siddharth Shah)' });&lt;br /&gt;
    const element_2 = screen.getByRole('cell', { name: 'Show Reviews (20)' });&lt;br /&gt;
    const element_3 = screen.getByRole('cell', { name: '99.99% - 100%' });&lt;br /&gt;
    const element_4 = screen.getByRole('cell', { name: '96.67 Show Author Feedback (10)' });&lt;br /&gt;
    const element_5 = screen.getByRole('cell', { name: '87% - 100%' });&lt;br /&gt;
    const element_6 = screen.getByRole('cell', { name: '4.64' });&lt;br /&gt;
    const element_7 = screen.getByRole('cell', { name: '90% - 100%' });&lt;br /&gt;
    const element_8 = screen.getByRole('cell', { name: '75% (in Finished)' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5).toBeInTheDocument();&lt;br /&gt;
    expect(element_6).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
    expect(element_8).toBeInTheDocument();&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct links', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('link', { name: 'show stats' });&lt;br /&gt;
    const element_2 = screen.getByRole('link', { name: 'ssshah26' });&lt;br /&gt;
    const element_3 = screen.getByRole('link', { name: 'Show Reviews' });&lt;br /&gt;
    const element_4 = screen.getByRole('link', { name: 'Show Author Feedback' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_statistics_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
* As a student I want to check all grading details of an assignment so that I can know my grade.&lt;br /&gt;
* As a student I want to see my submission of an assignment so that I can check what was submitted for a given assignment.&lt;br /&gt;
* As a student I want to see the names of my group team members so that I can know who I worked with.&lt;br /&gt;
* As a student I want to see the statistics of my grades so that I know my grade distribution.&lt;br /&gt;
* As a student I want to see if I got any late penalties so that I can know whether I got deducted points or not.&lt;br /&gt;
* As a student I want to have a way to view all the reviews that I got for the assignment so that I can read the viewer's responses.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This design document introduces a step-by-step plan for updating the &amp;quot;view-team-grades&amp;quot; page on Expertiza, aiming for a user interface that is visually appealing and simple. Using React and TypeScript, the goal is to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. A clear and flexible UI design makes it not only simple to maintain but also flexible enough for future upgrades. &lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_supporting_closed.png&amp;diff=160794</id>
		<title>File:Simon supporting closed.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_supporting_closed.png&amp;diff=160794"/>
		<updated>2024-12-04T08:09:42Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160785</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160785"/>
		<updated>2024-12-04T07:59:37Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Actual Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible and Actual Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of statistics table: &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
The statistics table that encompasses the &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes. The changes are highlighted below.&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make it easier to read and understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
The two proposed changes highlighted above were combined to create a new statistics table. Each of the 2 proposed changes introduces good mechanisms for achieving clarity and delivering a visually appealing statistics table to the user. Below is a snapshot of the new statistics table. Notice how easy it is to read and follow the details in the table as opposed to the original table.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/Statistics.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statisticstsx Statistics.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 2. Change the Location and Format of Team Member List === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
The team member list is a type of information that should be readily available to the user. Instead, it is placed almost at the bottom of the page. Also, the font size is really small which makes it difficult to locate and read. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the &amp;quot;RoundSelector.tsx&amp;quot; file contains a function and its main purpose is to select the review round. However, its function is also to display the team member list. This violates the single responsibility principle. To fix this issue and allow the &amp;quot;RoundSelector&amp;quot; function to perform one function only, which in this case is to select the review round, it would be wise to move the code to gather and display the team information elsewhere — most likely inside the ReviewTable.tsx file.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of where the team member list is located in the UI. The team member list is outlined in red for visibility:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Notice how small the font size is. Also, the team list should be located at the beginning of the page because it is part of the basic information that should be rendered first.&lt;br /&gt;
&lt;br /&gt;
The current code to gather and display the team member list is located inside the &amp;quot;RoundSelector.tsx&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3b.png|450px]]&lt;br /&gt;
&lt;br /&gt;
Our goal is to change the location of the code snippets that are outlined in red to another location. This change will allow the RoundSelector function to only focus on selecting the review &amp;quot;Rounds&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Place the team list at the top of the page '''  &lt;br /&gt;
The possible location of the team list will be in between the &amp;quot;Team&amp;quot; and &amp;quot;Average peer review score&amp;quot; information. The text format will also be changed. A larger text size will be introduced. These changes will allow the user to locate the list of the names of his/her team.&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Change the location of the code that gathers and displays the team list elsewhere '''&lt;br /&gt;
Changing the location of the code from the &amp;quot;RoundSelector.tsx&amp;quot; file to the &amp;quot;ReviewTable.tsx&amp;quot; file would allow us to fix the violation of the single responsibility principle in &amp;quot;RoundSelector.tsx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
Below is a screenshot of the new location of the team member list outlined in red for visibility. Notice that the team member list is easy to locate as well as easy to read. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Also, we changed the code to gather and display the team member list in the &amp;quot;ReviewTable.tsx&amp;quot; file. The new code snippets added are outlined in red for visibility&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3d.png]]&lt;br /&gt;
&lt;br /&gt;
The new &amp;quot;RoundSelector.tsx&amp;quot; contains the function that is ONLY focussed on selecting the review &amp;quot;Round&amp;quot; and thus obeys the single responsibility principle. A snapshot of the new function is provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3e.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/RoundSelector.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/RoundSelelctor.tsx RoundSelector.tsx]&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.tsx ReviewTable.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 3.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Export buttons for CSV and Excel are located below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Utilizes the SheetJS (xlsx) library to generate exportable files. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. File structure matches the table's visible data. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const exportTableData = (format: &amp;quot;csv&amp;quot; | &amp;quot;xlsx&amp;quot;) =&amp;gt; {&lt;br /&gt;
    const tableData = initialData.map((row) =&amp;gt; {&lt;br /&gt;
        const rowData: Record&amp;lt;string, any&amp;gt; = {};&lt;br /&gt;
        columns.forEach((col) =&amp;gt; {&lt;br /&gt;
            const accessor = col.id; // Use column `id` for keys&lt;br /&gt;
            if (accessor) {&lt;br /&gt;
                rowData[accessor] = row[accessor];&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
        return rowData;&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    const worksheet = XLSX.utils.json_to_sheet(tableData);&lt;br /&gt;
    const workbook = XLSX.utils.book_new();&lt;br /&gt;
    XLSX.utils.book_append_sheet(workbook, worksheet, &amp;quot;TableData&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    const fileType = format === &amp;quot;csv&amp;quot; ? &amp;quot;csv&amp;quot; : &amp;quot;xlsx&amp;quot;;&lt;br /&gt;
    XLSX.writeFile(workbook, `table_data.${fileType}`);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Export Buttons in the UI:'''&lt;br /&gt;
&amp;lt;div style={{ marginTop: &amp;quot;10px&amp;quot; }}&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;csv&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary me-2&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to CSV&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;xlsx&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to Excel&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing:'''&lt;br /&gt;
it(&amp;quot;renders export buttons&amp;quot;, () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Table data={mockData} columns={mockColumns} /&amp;gt;);&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to CSV&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to Excel&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
=== 4.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const [lastUpdated, setLastUpdated] = useState&amp;lt;Date | null&amp;gt;(null);&lt;br /&gt;
&lt;br /&gt;
const refreshTableData = () =&amp;gt; {&lt;br /&gt;
    setLastUpdated(new Date());&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
=== 5.Extending toggle options === &lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
While the heat map provides a great visual representation of the users feedback, with the addition of some 'toggles' we can better idea of the different values. Currently, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: old_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
In this current mode, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_opened.png|650px]]&lt;br /&gt;
&lt;br /&gt;
In the updated version, since more toggle options were added, there is now a heat map option menu, that can be opened and closed. When open, there are 4 different checkboxes to check from that each provide their own way of helping the student better analyze their team grade.&lt;br /&gt;
&lt;br /&gt;
When menu is closed:&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_closed.png|250px]]&lt;br /&gt;
&lt;br /&gt;
''' Supporting Code: '''&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_closed.png|250px]]&lt;br /&gt;
&lt;br /&gt;
Here is the supporting code for the 3 new toggle options, showToggle10WordComments, showToggle20WordComments, and showToggleCustomWordComment are all boolean values that if their state is set to true filter and count reviews based on the properties of their comments. When they're set to true, it will first ensure that the comments are defined as strings and not undefined (since a user can leave a review without providing a comment), it will then filter over the reviews array within a row and filter and return the total number of comments that meet the respective criteria.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTableRow.tsx&lt;br /&gt;
&lt;br /&gt;
=== 6.Refactoring Code === &lt;br /&gt;
We will work on refactoring some of the code, for example, changing naming conventions along with making sure SOLID principles are being used.&lt;br /&gt;
&lt;br /&gt;
==== Refactoring code 1 ====&lt;br /&gt;
Updated naming convention for a toggle option&lt;br /&gt;
&lt;br /&gt;
Previous:unclear state variable name with no comment&lt;br /&gt;
&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File: supporting_code5.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Refactored: Added a comment to explain what the state was as well as changing the variable name to be more direct.&lt;br /&gt;
[[File: supporting_code4.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* src/pages/ViewTeamGrades/App.tsx&lt;br /&gt;
* src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagram ==&lt;br /&gt;
&lt;br /&gt;
The use case diagram for the &amp;quot;view-team-grades&amp;quot; page after clicking &amp;quot;Grades View&amp;quot; in Expertiza highlights various interactions with the UI. Here's a general outline of possible actors and use cases:&lt;br /&gt;
&lt;br /&gt;
=== Actors: ===&lt;br /&gt;
&lt;br /&gt;
* Student - Primarily interacts with the UI to view all the grading details for an assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases: ===&lt;br /&gt;
 &lt;br /&gt;
* View detailed grade of a particular assignment - Including assignment name, team name, average score, etc.&lt;br /&gt;
* Show Submission - This link redirects the student to a new page where the student can see his/her submission details.&lt;br /&gt;
* Show Stats - This link redirects the student to a new page where the student can see grading statistics.&lt;br /&gt;
* Submitted Work - This table shows the average and range of submitted work grades. &lt;br /&gt;
**Show Reviews - This link located in the &amp;quot;Submitted Work&amp;quot; table redirects the student to the page that renders all the reviews that the student obtained from his/her peers.&lt;br /&gt;
* Author Feedback - This table shows the average and range of author feedback for the submitted work. &lt;br /&gt;
**Show Author Feedback - This link located in the &amp;quot;Author Feedback&amp;quot; table redirects the student to the page that renders the author feedback that the student obtained after writing a review.&lt;br /&gt;
* Teammate Review - This table shows the average and range of teammate reviews for the submitted work.&lt;br /&gt;
* Back - Link that enables the student to go back to the main page&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[File: yusufov_d2.png |750px|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
To validate the newly designed &amp;quot;View Submissions&amp;quot; page's functionality, usability, and performance while meeting the goals of clarity, consistency, flexibility, and intuitivenes. &lt;br /&gt;
&lt;br /&gt;
=== Testing Scope ===&lt;br /&gt;
1. Component Validation&lt;br /&gt;
* Test individual React components like ReviewTable.tsx and Statistics.tsx.&lt;br /&gt;
2. API Integration&lt;br /&gt;
* Verify API calls using useAPI.ts to ensure seamless backend integration.&lt;br /&gt;
3. Dynamic Features&lt;br /&gt;
* Test real-time updates (e.g., &amp;quot;Last Updated&amp;quot; timestamps).&lt;br /&gt;
&lt;br /&gt;
=== Test Cases: ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Test Case ID&lt;br /&gt;
! Test Description&lt;br /&gt;
! Expected Outcome&lt;br /&gt;
! Priority&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
| TC001&lt;br /&gt;
| Verify assignment name display&lt;br /&gt;
| Assignment names appear accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC002&lt;br /&gt;
| Validate &amp;quot;Show Stats&amp;quot; link&lt;br /&gt;
| Redirects to accurate grading statistics page.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC003&lt;br /&gt;
| Test pagination in tables&lt;br /&gt;
| Pagination works correctly for large datasets.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC004&lt;br /&gt;
| Test table export functionality&lt;br /&gt;
| CSV and Excel files match table content accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC005&lt;br /&gt;
| Validate data rendering&lt;br /&gt;
| Tables display data using mock files like `dummyData.json`.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC006&lt;br /&gt;
| Test error handling for missing data&lt;br /&gt;
| UI displays appropriate placeholders or messages for empty datasets.&lt;br /&gt;
| Low&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC007&lt;br /&gt;
| Verify contributor details&lt;br /&gt;
| Names and user IDs are displayed accurately.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC008&lt;br /&gt;
| Validate new thresholds for review length&lt;br /&gt;
| Dynamic thresholds for word/character counts update and display correctly.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
&lt;br /&gt;
Unit Testing:&lt;br /&gt;
*Write tests for individual components like ReviewTable using Jest.&lt;br /&gt;
*Validate utility functions in utils.ts.&lt;br /&gt;
&lt;br /&gt;
Integration Testing:&lt;br /&gt;
* Test the interaction between App.tsx and its child components.&lt;br /&gt;
* Validate API responses using axios_client.ts.&lt;br /&gt;
&lt;br /&gt;
Performance Testing:&lt;br /&gt;
* Simulate exporting large datasets to assess system performance.&lt;br /&gt;
* Measure response times for table rendering with dummyData.json.&lt;br /&gt;
&lt;br /&gt;
Accessibility Testing:&lt;br /&gt;
*Test keyboard navigation and WCAG 2.1 compliance.&lt;br /&gt;
&lt;br /&gt;
== Actual Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for ReviewTable using Jest === &lt;br /&gt;
&lt;br /&gt;
*The ReviewTable component is validated using the Jest and React Testing Libraries. Running tests on the ReviewTable component allowed us to determine whether the component rendered without crashing by utilizing the render function provided by the React Testing Library. The ReviewTable component was wrapped inside a Router component imported from react-router-dom, to establish the necessary routing context for components that rely on React Router. This configuration allows the test to simulate the environment in which the component operates accurately. Overall, the test file serves as a quality assurance measure, verifying that the ReviewTable component can render successfully and integrate correctly with the React Router.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.test.tsx ReviewTable.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render} from '@testing-library/react';&lt;br /&gt;
import { BrowserRouter as Router } from 'react-router-dom';&lt;br /&gt;
import ReviewTable from './ReviewTable';&lt;br /&gt;
&lt;br /&gt;
describe('ReviewTable component', () =&amp;gt; {&lt;br /&gt;
    test('renders without crashing', () =&amp;gt; {&lt;br /&gt;
        render(&lt;br /&gt;
          &amp;lt;Router&amp;gt; {/* Wrap your component with Router */}&lt;br /&gt;
            &amp;lt;ReviewTable /&amp;gt;&lt;br /&gt;
          &amp;lt;/Router&amp;gt;&lt;br /&gt;
        );&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
[[File: loyda_review_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for Statistics Component using Jest === &lt;br /&gt;
&lt;br /&gt;
*The Statistics component is validated using the Jest and React Testing Libraries. It employs the Jest and React Testing Library for testing purposes, along with the jest-dom library for custom assertions. The first test &amp;quot;renders the correct labels&amp;quot; ensures that the statistics table renders the correct labels. The second test &amp;quot;renders correct statistical information for each label&amp;quot; ensures that the statistical information is rendered correctly under each label. Lastly, their test &amp;quot;renders correct links&amp;quot; ensures that all the necessary links are rendered.  Overall, these tests comprehensively evaluate the rendering and functionality of the Statistics component.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statistics.test.tsx Statistics.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render, screen } from '@testing-library/react';&lt;br /&gt;
import '@testing-library/jest-dom/extend-expect'; // Import jest-dom for custom assertions&lt;br /&gt;
import Statistics from './Statistics'; // Import the component to test&lt;br /&gt;
&lt;br /&gt;
describe('Statistics', () =&amp;gt; {&lt;br /&gt;
  test('renders the correct labels', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('columnheader', { name: 'Submitted Work' });&lt;br /&gt;
    const element_2 = screen.getByRole('columnheader', { name: 'Author Feedback' });&lt;br /&gt;
    const element_3 = screen.getByRole('columnheader', { name: 'Teammate Review' });&lt;br /&gt;
    const element_4 = screen.getByRole('columnheader', { name: 'Contributor' });&lt;br /&gt;
    &lt;br /&gt;
    const element_5 = screen.getAllByText(/Average/i);&lt;br /&gt;
    const element_6 = screen.getAllByText(/Range/i);&lt;br /&gt;
    const element_7 = screen.getByRole('columnheader', { name: 'Final Score' });&lt;br /&gt;
&lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_6[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct statistical information for each label', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('cell', { name: 'ssshah26 (Siddharth Shah)' });&lt;br /&gt;
    const element_2 = screen.getByRole('cell', { name: 'Show Reviews (20)' });&lt;br /&gt;
    const element_3 = screen.getByRole('cell', { name: '99.99% - 100%' });&lt;br /&gt;
    const element_4 = screen.getByRole('cell', { name: '96.67 Show Author Feedback (10)' });&lt;br /&gt;
    const element_5 = screen.getByRole('cell', { name: '87% - 100%' });&lt;br /&gt;
    const element_6 = screen.getByRole('cell', { name: '4.64' });&lt;br /&gt;
    const element_7 = screen.getByRole('cell', { name: '90% - 100%' });&lt;br /&gt;
    const element_8 = screen.getByRole('cell', { name: '75% (in Finished)' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5).toBeInTheDocument();&lt;br /&gt;
    expect(element_6).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
    expect(element_8).toBeInTheDocument();&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct links', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('link', { name: 'show stats' });&lt;br /&gt;
    const element_2 = screen.getByRole('link', { name: 'ssshah26' });&lt;br /&gt;
    const element_3 = screen.getByRole('link', { name: 'Show Reviews' });&lt;br /&gt;
    const element_4 = screen.getByRole('link', { name: 'Show Author Feedback' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_statistics_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
* As a student I want to check all grading details of an assignment so that I can know my grade.&lt;br /&gt;
* As a student I want to see my submission of an assignment so that I can check what was submitted for a given assignment.&lt;br /&gt;
* As a student I want to see the names of my group team members so that I can know who I worked with.&lt;br /&gt;
* As a student I want to see the statistics of my grades so that I know my grade distribution.&lt;br /&gt;
* As a student I want to see if I got any late penalties so that I can know whether I got deducted points or not.&lt;br /&gt;
* As a student I want to have a way to view all the reviews that I got for the assignment so that I can read the viewer's responses.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This design document introduces a step-by-step plan for updating the &amp;quot;view-team-grades&amp;quot; page on Expertiza, aiming for a user interface that is visually appealing and simple. Using React and TypeScript, the goal is to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. A clear and flexible UI design makes it not only simple to maintain but also flexible enough for future upgrades. &lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160784</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160784"/>
		<updated>2024-12-04T07:57:28Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Actual Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible and Actual Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of statistics table: &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
The statistics table that encompasses the &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes. The changes are highlighted below.&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make it easier to read and understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
The two proposed changes highlighted above were combined to create a new statistics table. Each of the 2 proposed changes introduces good mechanisms for achieving clarity and delivering a visually appealing statistics table to the user. Below is a snapshot of the new statistics table. Notice how easy it is to read and follow the details in the table as opposed to the original table.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/Statistics.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statisticstsx Statistics.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 2. Change the Location and Format of Team Member List === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
The team member list is a type of information that should be readily available to the user. Instead, it is placed almost at the bottom of the page. Also, the font size is really small which makes it difficult to locate and read. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the &amp;quot;RoundSelector.tsx&amp;quot; file contains a function and its main purpose is to select the review round. However, its function is also to display the team member list. This violates the single responsibility principle. To fix this issue and allow the &amp;quot;RoundSelector&amp;quot; function to perform one function only, which in this case is to select the review round, it would be wise to move the code to gather and display the team information elsewhere — most likely inside the ReviewTable.tsx file.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of where the team member list is located in the UI. The team member list is outlined in red for visibility:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Notice how small the font size is. Also, the team list should be located at the beginning of the page because it is part of the basic information that should be rendered first.&lt;br /&gt;
&lt;br /&gt;
The current code to gather and display the team member list is located inside the &amp;quot;RoundSelector.tsx&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3b.png|450px]]&lt;br /&gt;
&lt;br /&gt;
Our goal is to change the location of the code snippets that are outlined in red to another location. This change will allow the RoundSelector function to only focus on selecting the review &amp;quot;Rounds&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Place the team list at the top of the page '''  &lt;br /&gt;
The possible location of the team list will be in between the &amp;quot;Team&amp;quot; and &amp;quot;Average peer review score&amp;quot; information. The text format will also be changed. A larger text size will be introduced. These changes will allow the user to locate the list of the names of his/her team.&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Change the location of the code that gathers and displays the team list elsewhere '''&lt;br /&gt;
Changing the location of the code from the &amp;quot;RoundSelector.tsx&amp;quot; file to the &amp;quot;ReviewTable.tsx&amp;quot; file would allow us to fix the violation of the single responsibility principle in &amp;quot;RoundSelector.tsx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
Below is a screenshot of the new location of the team member list outlined in red for visibility. Notice that the team member list is easy to locate as well as easy to read. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Also, we changed the code to gather and display the team member list in the &amp;quot;ReviewTable.tsx&amp;quot; file. The new code snippets added are outlined in red for visibility&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3d.png]]&lt;br /&gt;
&lt;br /&gt;
The new &amp;quot;RoundSelector.tsx&amp;quot; contains the function that is ONLY focussed on selecting the review &amp;quot;Round&amp;quot; and thus obeys the single responsibility principle. A snapshot of the new function is provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3e.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/RoundSelector.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/RoundSelelctor.tsx RoundSelector.tsx]&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.tsx ReviewTable.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 3.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Export buttons for CSV and Excel are located below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Utilizes the SheetJS (xlsx) library to generate exportable files. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. File structure matches the table's visible data. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const exportTableData = (format: &amp;quot;csv&amp;quot; | &amp;quot;xlsx&amp;quot;) =&amp;gt; {&lt;br /&gt;
    const tableData = initialData.map((row) =&amp;gt; {&lt;br /&gt;
        const rowData: Record&amp;lt;string, any&amp;gt; = {};&lt;br /&gt;
        columns.forEach((col) =&amp;gt; {&lt;br /&gt;
            const accessor = col.id; // Use column `id` for keys&lt;br /&gt;
            if (accessor) {&lt;br /&gt;
                rowData[accessor] = row[accessor];&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
        return rowData;&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    const worksheet = XLSX.utils.json_to_sheet(tableData);&lt;br /&gt;
    const workbook = XLSX.utils.book_new();&lt;br /&gt;
    XLSX.utils.book_append_sheet(workbook, worksheet, &amp;quot;TableData&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    const fileType = format === &amp;quot;csv&amp;quot; ? &amp;quot;csv&amp;quot; : &amp;quot;xlsx&amp;quot;;&lt;br /&gt;
    XLSX.writeFile(workbook, `table_data.${fileType}`);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Export Buttons in the UI:'''&lt;br /&gt;
&amp;lt;div style={{ marginTop: &amp;quot;10px&amp;quot; }}&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;csv&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary me-2&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to CSV&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;xlsx&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to Excel&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing:'''&lt;br /&gt;
it(&amp;quot;renders export buttons&amp;quot;, () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Table data={mockData} columns={mockColumns} /&amp;gt;);&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to CSV&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to Excel&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
=== 4.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const [lastUpdated, setLastUpdated] = useState&amp;lt;Date | null&amp;gt;(null);&lt;br /&gt;
&lt;br /&gt;
const refreshTableData = () =&amp;gt; {&lt;br /&gt;
    setLastUpdated(new Date());&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
=== 5.Extending toggle options === &lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
While the heat map provides a great visual representation of the users feedback, with the addition of some 'toggles' we can better idea of the different values. Currently, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: old_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
In this current mode, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_opened.png|650px]]&lt;br /&gt;
&lt;br /&gt;
In the updated version, since more toggle options were added, there is now a heat map option menu, that can be opened and closed. When open, there are 4 different checkboxes to check from that each provide their own way of helping the student better analyze their team grade.&lt;br /&gt;
&lt;br /&gt;
When menu is closed:&lt;br /&gt;
[[File: simon_supporting_closed.png|250px]]&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
Here is the supporting code for the 3 new toggle options, showToggle10WordComments, showToggle20WordComments, and showToggleCustomWordComment are all boolean values that if their state is set to true filter and count reviews based on the properties of their comments. When they're set to true, it will first ensure that the comments are defined as strings and not undefined (since a user can leave a review without providing a comment), it will then filter over the reviews array within a row and filter and return the total number of comments that meet the respective criteria.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTableRow.tsx&lt;br /&gt;
&lt;br /&gt;
=== 6.Refactoring Code === &lt;br /&gt;
We will work on refactoring some of the code, for example, changing naming conventions along with making sure SOLID principles are being used.&lt;br /&gt;
&lt;br /&gt;
==== Refactoring code 1 ====&lt;br /&gt;
Updated naming convention for a toggle option&lt;br /&gt;
&lt;br /&gt;
Previous:unclear state variable name with no comment&lt;br /&gt;
&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File: supporting_code5.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Refactored: Added a comment to explain what the state was as well as changing the variable name to be more direct.&lt;br /&gt;
[[File: supporting_code4.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* src/pages/ViewTeamGrades/App.tsx&lt;br /&gt;
* src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagram ==&lt;br /&gt;
&lt;br /&gt;
The use case diagram for the &amp;quot;view-team-grades&amp;quot; page after clicking &amp;quot;Grades View&amp;quot; in Expertiza highlights various interactions with the UI. Here's a general outline of possible actors and use cases:&lt;br /&gt;
&lt;br /&gt;
=== Actors: ===&lt;br /&gt;
&lt;br /&gt;
* Student - Primarily interacts with the UI to view all the grading details for an assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases: ===&lt;br /&gt;
 &lt;br /&gt;
* View detailed grade of a particular assignment - Including assignment name, team name, average score, etc.&lt;br /&gt;
* Show Submission - This link redirects the student to a new page where the student can see his/her submission details.&lt;br /&gt;
* Show Stats - This link redirects the student to a new page where the student can see grading statistics.&lt;br /&gt;
* Submitted Work - This table shows the average and range of submitted work grades. &lt;br /&gt;
**Show Reviews - This link located in the &amp;quot;Submitted Work&amp;quot; table redirects the student to the page that renders all the reviews that the student obtained from his/her peers.&lt;br /&gt;
* Author Feedback - This table shows the average and range of author feedback for the submitted work. &lt;br /&gt;
**Show Author Feedback - This link located in the &amp;quot;Author Feedback&amp;quot; table redirects the student to the page that renders the author feedback that the student obtained after writing a review.&lt;br /&gt;
* Teammate Review - This table shows the average and range of teammate reviews for the submitted work.&lt;br /&gt;
* Back - Link that enables the student to go back to the main page&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[File: yusufov_d2.png |750px|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
To validate the newly designed &amp;quot;View Submissions&amp;quot; page's functionality, usability, and performance while meeting the goals of clarity, consistency, flexibility, and intuitivenes. &lt;br /&gt;
&lt;br /&gt;
=== Testing Scope ===&lt;br /&gt;
1. Component Validation&lt;br /&gt;
* Test individual React components like ReviewTable.tsx and Statistics.tsx.&lt;br /&gt;
2. API Integration&lt;br /&gt;
* Verify API calls using useAPI.ts to ensure seamless backend integration.&lt;br /&gt;
3. Dynamic Features&lt;br /&gt;
* Test real-time updates (e.g., &amp;quot;Last Updated&amp;quot; timestamps).&lt;br /&gt;
&lt;br /&gt;
=== Test Cases: ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Test Case ID&lt;br /&gt;
! Test Description&lt;br /&gt;
! Expected Outcome&lt;br /&gt;
! Priority&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
| TC001&lt;br /&gt;
| Verify assignment name display&lt;br /&gt;
| Assignment names appear accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC002&lt;br /&gt;
| Validate &amp;quot;Show Stats&amp;quot; link&lt;br /&gt;
| Redirects to accurate grading statistics page.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC003&lt;br /&gt;
| Test pagination in tables&lt;br /&gt;
| Pagination works correctly for large datasets.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC004&lt;br /&gt;
| Test table export functionality&lt;br /&gt;
| CSV and Excel files match table content accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC005&lt;br /&gt;
| Validate data rendering&lt;br /&gt;
| Tables display data using mock files like `dummyData.json`.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC006&lt;br /&gt;
| Test error handling for missing data&lt;br /&gt;
| UI displays appropriate placeholders or messages for empty datasets.&lt;br /&gt;
| Low&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC007&lt;br /&gt;
| Verify contributor details&lt;br /&gt;
| Names and user IDs are displayed accurately.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC008&lt;br /&gt;
| Validate new thresholds for review length&lt;br /&gt;
| Dynamic thresholds for word/character counts update and display correctly.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
&lt;br /&gt;
Unit Testing:&lt;br /&gt;
*Write tests for individual components like ReviewTable using Jest.&lt;br /&gt;
*Validate utility functions in utils.ts.&lt;br /&gt;
&lt;br /&gt;
Integration Testing:&lt;br /&gt;
* Test the interaction between App.tsx and its child components.&lt;br /&gt;
* Validate API responses using axios_client.ts.&lt;br /&gt;
&lt;br /&gt;
Performance Testing:&lt;br /&gt;
* Simulate exporting large datasets to assess system performance.&lt;br /&gt;
* Measure response times for table rendering with dummyData.json.&lt;br /&gt;
&lt;br /&gt;
Accessibility Testing:&lt;br /&gt;
*Test keyboard navigation and WCAG 2.1 compliance.&lt;br /&gt;
&lt;br /&gt;
== Actual Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for ReviewTable using Jest === &lt;br /&gt;
&lt;br /&gt;
*The ReviewTable component is validated using the Jest and React Testing Libraries. Running tests on the ReviewTable component allowed us to determine whether the component rendered without crashing by utilizing the render function provided by the React Testing Library. The ReviewTable component was wrapped inside a Router component imported from react-router-dom, to establish the necessary routing context for components that rely on React Router. This configuration allows the test to simulate the environment in which the component operates accurately. Overall, the test file serves as a quality assurance measure, verifying that the ReviewTable component can render successfully and integrate correctly with the React Router.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.test.tsx ReviewTable.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render} from '@testing-library/react';&lt;br /&gt;
import { BrowserRouter as Router } from 'react-router-dom';&lt;br /&gt;
import ReviewTable from './ReviewTable';&lt;br /&gt;
&lt;br /&gt;
describe('ReviewTable component', () =&amp;gt; {&lt;br /&gt;
    test('renders without crashing', () =&amp;gt; {&lt;br /&gt;
        render(&lt;br /&gt;
          &amp;lt;Router&amp;gt; {/* Wrap your component with Router */}&lt;br /&gt;
            &amp;lt;ReviewTable /&amp;gt;&lt;br /&gt;
          &amp;lt;/Router&amp;gt;&lt;br /&gt;
        );&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
[[File: loyda_review_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for Statistics Component using Jest === &lt;br /&gt;
&lt;br /&gt;
*The Statistics component is validated using the Jest and React Testing Libraries. It employs the Jest and React Testing Library for testing purposes, along with the jest-dom library for custom assertions. The first test &amp;quot;renders the correct labels&amp;quot; ensures that the statistics table renders the correct labels. The second test &amp;quot;renders correct statistical information for each label&amp;quot; ensures that the statistical information is rendered correctly under each label. Lastly, their test &amp;quot;renders correct links&amp;quot; ensures that all the necessary links are rendered.  Overall, these tests comprehensively evaluate the rendering and functionality of the Statistics component.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statistics.test.tsx Statistics.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render, screen } from '@testing-library/react';&lt;br /&gt;
import '@testing-library/jest-dom/extend-expect'; // Import jest-dom for custom assertions&lt;br /&gt;
import Statistics from './Statistics'; // Import the component to test&lt;br /&gt;
&lt;br /&gt;
describe('Statistics', () =&amp;gt; {&lt;br /&gt;
  test('renders the correct labels', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('columnheader', { name: 'Submitted Work' });&lt;br /&gt;
    const element_2 = screen.getByRole('columnheader', { name: 'Author Feedback' });&lt;br /&gt;
    const element_3 = screen.getByRole('columnheader', { name: 'Teammate Review' });&lt;br /&gt;
    const element_4 = screen.getByRole('columnheader', { name: 'Contributor' });&lt;br /&gt;
    &lt;br /&gt;
    const element_5 = screen.getAllByText(/Average/i);&lt;br /&gt;
    const element_6 = screen.getAllByText(/Range/i);&lt;br /&gt;
    const element_7 = screen.getByRole('columnheader', { name: 'Final Score' });&lt;br /&gt;
&lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_6[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct statistical information for each label', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('cell', { name: 'ssshah26 (Siddharth Shah)' });&lt;br /&gt;
    const element_2 = screen.getByRole('cell', { name: 'Show Reviews (20)' });&lt;br /&gt;
    const element_3 = screen.getByRole('cell', { name: '99.99% - 100%' });&lt;br /&gt;
    const element_4 = screen.getByRole('cell', { name: '96.67 Show Author Feedback (10)' });&lt;br /&gt;
    const element_5 = screen.getByRole('cell', { name: '87% - 100%' });&lt;br /&gt;
    const element_6 = screen.getByRole('cell', { name: '4.64' });&lt;br /&gt;
    const element_7 = screen.getByRole('cell', { name: '90% - 100%' });&lt;br /&gt;
    const element_8 = screen.getByRole('cell', { name: '75% (in Finished)' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5).toBeInTheDocument();&lt;br /&gt;
    expect(element_6).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
    expect(element_8).toBeInTheDocument();&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct links', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('link', { name: 'show stats' });&lt;br /&gt;
    const element_2 = screen.getByRole('link', { name: 'ssshah26' });&lt;br /&gt;
    const element_3 = screen.getByRole('link', { name: 'Show Reviews' });&lt;br /&gt;
    const element_4 = screen.getByRole('link', { name: 'Show Author Feedback' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_statistics_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
* As a student I want to check all grading details of an assignment so that I can know my grade.&lt;br /&gt;
* As a student I want to see my submission of an assignment so that I can check what was submitted for a given assignment.&lt;br /&gt;
* As a student I want to see the names of my group team members so that I can know who I worked with.&lt;br /&gt;
* As a student I want to see the statistics of my grades so that I know my grade distribution.&lt;br /&gt;
* As a student I want to see if I got any late penalties so that I can know whether I got deducted points or not.&lt;br /&gt;
* As a student I want to have a way to view all the reviews that I got for the assignment so that I can read the viewer's responses.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This design document introduces a step-by-step plan for updating the &amp;quot;view-team-grades&amp;quot; page on Expertiza, aiming for a user interface that is visually appealing and simple. Using React and TypeScript, the goal is to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. A clear and flexible UI design makes it not only simple to maintain but also flexible enough for future upgrades. &lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160783</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=160783"/>
		<updated>2024-12-04T07:56:43Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Detail Description of Possible and Actual Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible and Actual Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of statistics table: &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
The statistics table that encompasses the &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes. The changes are highlighted below.&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make it easier to read and understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
The two proposed changes highlighted above were combined to create a new statistics table. Each of the 2 proposed changes introduces good mechanisms for achieving clarity and delivering a visually appealing statistics table to the user. Below is a snapshot of the new statistics table. Notice how easy it is to read and follow the details in the table as opposed to the original table.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/Statistics.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statisticstsx Statistics.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 2. Change the Location and Format of Team Member List === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
The team member list is a type of information that should be readily available to the user. Instead, it is placed almost at the bottom of the page. Also, the font size is really small which makes it difficult to locate and read. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the &amp;quot;RoundSelector.tsx&amp;quot; file contains a function and its main purpose is to select the review round. However, its function is also to display the team member list. This violates the single responsibility principle. To fix this issue and allow the &amp;quot;RoundSelector&amp;quot; function to perform one function only, which in this case is to select the review round, it would be wise to move the code to gather and display the team information elsewhere — most likely inside the ReviewTable.tsx file.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of where the team member list is located in the UI. The team member list is outlined in red for visibility:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Notice how small the font size is. Also, the team list should be located at the beginning of the page because it is part of the basic information that should be rendered first.&lt;br /&gt;
&lt;br /&gt;
The current code to gather and display the team member list is located inside the &amp;quot;RoundSelector.tsx&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3b.png|450px]]&lt;br /&gt;
&lt;br /&gt;
Our goal is to change the location of the code snippets that are outlined in red to another location. This change will allow the RoundSelector function to only focus on selecting the review &amp;quot;Rounds&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Place the team list at the top of the page '''  &lt;br /&gt;
The possible location of the team list will be in between the &amp;quot;Team&amp;quot; and &amp;quot;Average peer review score&amp;quot; information. The text format will also be changed. A larger text size will be introduced. These changes will allow the user to locate the list of the names of his/her team.&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Change the location of the code that gathers and displays the team list elsewhere '''&lt;br /&gt;
Changing the location of the code from the &amp;quot;RoundSelector.tsx&amp;quot; file to the &amp;quot;ReviewTable.tsx&amp;quot; file would allow us to fix the violation of the single responsibility principle in &amp;quot;RoundSelector.tsx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
Below is a screenshot of the new location of the team member list outlined in red for visibility. Notice that the team member list is easy to locate as well as easy to read. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Also, we changed the code to gather and display the team member list in the &amp;quot;ReviewTable.tsx&amp;quot; file. The new code snippets added are outlined in red for visibility&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3d.png]]&lt;br /&gt;
&lt;br /&gt;
The new &amp;quot;RoundSelector.tsx&amp;quot; contains the function that is ONLY focussed on selecting the review &amp;quot;Round&amp;quot; and thus obeys the single responsibility principle. A snapshot of the new function is provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3e.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/RoundSelector.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/RoundSelelctor.tsx RoundSelector.tsx]&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx [https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.tsx ReviewTable.tsx]&lt;br /&gt;
&lt;br /&gt;
=== 3.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Export buttons for CSV and Excel are located below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Utilizes the SheetJS (xlsx) library to generate exportable files. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. File structure matches the table's visible data. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const exportTableData = (format: &amp;quot;csv&amp;quot; | &amp;quot;xlsx&amp;quot;) =&amp;gt; {&lt;br /&gt;
    const tableData = initialData.map((row) =&amp;gt; {&lt;br /&gt;
        const rowData: Record&amp;lt;string, any&amp;gt; = {};&lt;br /&gt;
        columns.forEach((col) =&amp;gt; {&lt;br /&gt;
            const accessor = col.id; // Use column `id` for keys&lt;br /&gt;
            if (accessor) {&lt;br /&gt;
                rowData[accessor] = row[accessor];&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
        return rowData;&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    const worksheet = XLSX.utils.json_to_sheet(tableData);&lt;br /&gt;
    const workbook = XLSX.utils.book_new();&lt;br /&gt;
    XLSX.utils.book_append_sheet(workbook, worksheet, &amp;quot;TableData&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    const fileType = format === &amp;quot;csv&amp;quot; ? &amp;quot;csv&amp;quot; : &amp;quot;xlsx&amp;quot;;&lt;br /&gt;
    XLSX.writeFile(workbook, `table_data.${fileType}`);&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Export Buttons in the UI:'''&lt;br /&gt;
&amp;lt;div style={{ marginTop: &amp;quot;10px&amp;quot; }}&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;csv&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary me-2&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to CSV&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
    &amp;lt;button&lt;br /&gt;
        onClick={() =&amp;gt; exportTableData(&amp;quot;xlsx&amp;quot;)}&lt;br /&gt;
        className=&amp;quot;btn btn-primary&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
        Export to Excel&lt;br /&gt;
    &amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Testing:'''&lt;br /&gt;
it(&amp;quot;renders export buttons&amp;quot;, () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Table data={mockData} columns={mockColumns} /&amp;gt;);&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to CSV&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
    expect(screen.getByText(&amp;quot;Export to Excel&amp;quot;)).toBeInTheDocument();&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
=== 4.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
const [lastUpdated, setLastUpdated] = useState&amp;lt;Date | null&amp;gt;(null);&lt;br /&gt;
&lt;br /&gt;
const refreshTableData = () =&amp;gt; {&lt;br /&gt;
    setLastUpdated(new Date());&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
=== 5.Extending toggle options === &lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
While the heat map provides a great visual representation of the users feedback, with the addition of some 'toggles' we can better idea of the different values. Currently, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: old_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
In this current mode, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
&lt;br /&gt;
[[File: simon_new_menu_opened.png|650px]]&lt;br /&gt;
&lt;br /&gt;
In the updated version, since more toggle options were added, there is now a heat map option menu, that can be opened and closed. When open, there are 4 different checkboxes to check from that each provide their own way of helping the student better analyze their team grade.&lt;br /&gt;
&lt;br /&gt;
When menu is closed:&lt;br /&gt;
[[File: simon_supporting_closed.png|250px]]&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
&lt;br /&gt;
[[File: simon_supporting_code1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
Here is the supporting code for the 3 new toggle options, showToggle10WordComments, showToggle20WordComments, and showToggleCustomWordComment are all boolean values that if true filter and count reviews based on the properties of their comments. When they're set to true, it will first ensure that the comments are defined as strings and not undefined (since a user can leave a review without providing a comment), it will then filter over the reviews array within a row and filter and return the total number of comments that meet the respective criteria.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTableRow.tsx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 6.Refactoring Code === &lt;br /&gt;
We will work on refactoring some of the code, for example, changing naming conventions along with making sure SOLID principles are being used.&lt;br /&gt;
&lt;br /&gt;
==== Refactoring code 1 ====&lt;br /&gt;
Updated naming convention for a toggle option&lt;br /&gt;
&lt;br /&gt;
Previous:unclear state variable name with no comment&lt;br /&gt;
&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File: supporting_code5.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Refactored: Added a comment to explain what the state was as well as changing the variable name to be more direct.&lt;br /&gt;
[[File: supporting_code4.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* src/pages/ViewTeamGrades/App.tsx&lt;br /&gt;
* src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagram ==&lt;br /&gt;
&lt;br /&gt;
The use case diagram for the &amp;quot;view-team-grades&amp;quot; page after clicking &amp;quot;Grades View&amp;quot; in Expertiza highlights various interactions with the UI. Here's a general outline of possible actors and use cases:&lt;br /&gt;
&lt;br /&gt;
=== Actors: ===&lt;br /&gt;
&lt;br /&gt;
* Student - Primarily interacts with the UI to view all the grading details for an assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases: ===&lt;br /&gt;
 &lt;br /&gt;
* View detailed grade of a particular assignment - Including assignment name, team name, average score, etc.&lt;br /&gt;
* Show Submission - This link redirects the student to a new page where the student can see his/her submission details.&lt;br /&gt;
* Show Stats - This link redirects the student to a new page where the student can see grading statistics.&lt;br /&gt;
* Submitted Work - This table shows the average and range of submitted work grades. &lt;br /&gt;
**Show Reviews - This link located in the &amp;quot;Submitted Work&amp;quot; table redirects the student to the page that renders all the reviews that the student obtained from his/her peers.&lt;br /&gt;
* Author Feedback - This table shows the average and range of author feedback for the submitted work. &lt;br /&gt;
**Show Author Feedback - This link located in the &amp;quot;Author Feedback&amp;quot; table redirects the student to the page that renders the author feedback that the student obtained after writing a review.&lt;br /&gt;
* Teammate Review - This table shows the average and range of teammate reviews for the submitted work.&lt;br /&gt;
* Back - Link that enables the student to go back to the main page&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[File: yusufov_d2.png |750px|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
To validate the newly designed &amp;quot;View Submissions&amp;quot; page's functionality, usability, and performance while meeting the goals of clarity, consistency, flexibility, and intuitivenes. &lt;br /&gt;
&lt;br /&gt;
=== Testing Scope ===&lt;br /&gt;
1. Component Validation&lt;br /&gt;
* Test individual React components like ReviewTable.tsx and Statistics.tsx.&lt;br /&gt;
2. API Integration&lt;br /&gt;
* Verify API calls using useAPI.ts to ensure seamless backend integration.&lt;br /&gt;
3. Dynamic Features&lt;br /&gt;
* Test real-time updates (e.g., &amp;quot;Last Updated&amp;quot; timestamps).&lt;br /&gt;
&lt;br /&gt;
=== Test Cases: ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Test Case ID&lt;br /&gt;
! Test Description&lt;br /&gt;
! Expected Outcome&lt;br /&gt;
! Priority&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
| TC001&lt;br /&gt;
| Verify assignment name display&lt;br /&gt;
| Assignment names appear accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC002&lt;br /&gt;
| Validate &amp;quot;Show Stats&amp;quot; link&lt;br /&gt;
| Redirects to accurate grading statistics page.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC003&lt;br /&gt;
| Test pagination in tables&lt;br /&gt;
| Pagination works correctly for large datasets.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC004&lt;br /&gt;
| Test table export functionality&lt;br /&gt;
| CSV and Excel files match table content accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC005&lt;br /&gt;
| Validate data rendering&lt;br /&gt;
| Tables display data using mock files like `dummyData.json`.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC006&lt;br /&gt;
| Test error handling for missing data&lt;br /&gt;
| UI displays appropriate placeholders or messages for empty datasets.&lt;br /&gt;
| Low&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC007&lt;br /&gt;
| Verify contributor details&lt;br /&gt;
| Names and user IDs are displayed accurately.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC008&lt;br /&gt;
| Validate new thresholds for review length&lt;br /&gt;
| Dynamic thresholds for word/character counts update and display correctly.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
&lt;br /&gt;
Unit Testing:&lt;br /&gt;
*Write tests for individual components like ReviewTable using Jest.&lt;br /&gt;
*Validate utility functions in utils.ts.&lt;br /&gt;
&lt;br /&gt;
Integration Testing:&lt;br /&gt;
* Test the interaction between App.tsx and its child components.&lt;br /&gt;
* Validate API responses using axios_client.ts.&lt;br /&gt;
&lt;br /&gt;
Performance Testing:&lt;br /&gt;
* Simulate exporting large datasets to assess system performance.&lt;br /&gt;
* Measure response times for table rendering with dummyData.json.&lt;br /&gt;
&lt;br /&gt;
Accessibility Testing:&lt;br /&gt;
*Test keyboard navigation and WCAG 2.1 compliance.&lt;br /&gt;
&lt;br /&gt;
== Actual Testing ==&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for ReviewTable using Jest === &lt;br /&gt;
&lt;br /&gt;
*The ReviewTable component is validated using the Jest and React Testing Libraries. Running tests on the ReviewTable component allowed us to determine whether the component rendered without crashing by utilizing the render function provided by the React Testing Library. The ReviewTable component was wrapped inside a Router component imported from react-router-dom, to establish the necessary routing context for components that rely on React Router. This configuration allows the test to simulate the environment in which the component operates accurately. Overall, the test file serves as a quality assurance measure, verifying that the ReviewTable component can render successfully and integrate correctly with the React Router.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/ReviewTable.test.tsx ReviewTable.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render} from '@testing-library/react';&lt;br /&gt;
import { BrowserRouter as Router } from 'react-router-dom';&lt;br /&gt;
import ReviewTable from './ReviewTable';&lt;br /&gt;
&lt;br /&gt;
describe('ReviewTable component', () =&amp;gt; {&lt;br /&gt;
    test('renders without crashing', () =&amp;gt; {&lt;br /&gt;
        render(&lt;br /&gt;
          &amp;lt;Router&amp;gt; {/* Wrap your component with Router */}&lt;br /&gt;
            &amp;lt;ReviewTable /&amp;gt;&lt;br /&gt;
          &amp;lt;/Router&amp;gt;&lt;br /&gt;
        );&lt;br /&gt;
      });&lt;br /&gt;
&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
[[File: loyda_review_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing for Statistics Component using Jest === &lt;br /&gt;
&lt;br /&gt;
*The Statistics component is validated using the Jest and React Testing Libraries. It employs the Jest and React Testing Library for testing purposes, along with the jest-dom library for custom assertions. The first test &amp;quot;renders the correct labels&amp;quot; ensures that the statistics table renders the correct labels. The second test &amp;quot;renders correct statistical information for each label&amp;quot; ensures that the statistical information is rendered correctly under each label. Lastly, their test &amp;quot;renders correct links&amp;quot; ensures that all the necessary links are rendered.  Overall, these tests comprehensively evaluate the rendering and functionality of the Statistics component.&lt;br /&gt;
&lt;br /&gt;
====[https://github.com/simong2/reimplementation-front-end/blob/main/src/pages/ViewTeamGrades/Statistics.test.tsx Statistics.test.tsx]====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import React from 'react';&lt;br /&gt;
import { render, screen } from '@testing-library/react';&lt;br /&gt;
import '@testing-library/jest-dom/extend-expect'; // Import jest-dom for custom assertions&lt;br /&gt;
import Statistics from './Statistics'; // Import the component to test&lt;br /&gt;
&lt;br /&gt;
describe('Statistics', () =&amp;gt; {&lt;br /&gt;
  test('renders the correct labels', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('columnheader', { name: 'Submitted Work' });&lt;br /&gt;
    const element_2 = screen.getByRole('columnheader', { name: 'Author Feedback' });&lt;br /&gt;
    const element_3 = screen.getByRole('columnheader', { name: 'Teammate Review' });&lt;br /&gt;
    const element_4 = screen.getByRole('columnheader', { name: 'Contributor' });&lt;br /&gt;
    &lt;br /&gt;
    const element_5 = screen.getAllByText(/Average/i);&lt;br /&gt;
    const element_6 = screen.getAllByText(/Range/i);&lt;br /&gt;
    const element_7 = screen.getByRole('columnheader', { name: 'Final Score' });&lt;br /&gt;
&lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_6[0]).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct statistical information for each label', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('cell', { name: 'ssshah26 (Siddharth Shah)' });&lt;br /&gt;
    const element_2 = screen.getByRole('cell', { name: 'Show Reviews (20)' });&lt;br /&gt;
    const element_3 = screen.getByRole('cell', { name: '99.99% - 100%' });&lt;br /&gt;
    const element_4 = screen.getByRole('cell', { name: '96.67 Show Author Feedback (10)' });&lt;br /&gt;
    const element_5 = screen.getByRole('cell', { name: '87% - 100%' });&lt;br /&gt;
    const element_6 = screen.getByRole('cell', { name: '4.64' });&lt;br /&gt;
    const element_7 = screen.getByRole('cell', { name: '90% - 100%' });&lt;br /&gt;
    const element_8 = screen.getByRole('cell', { name: '75% (in Finished)' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
    expect(element_5).toBeInTheDocument();&lt;br /&gt;
    expect(element_6).toBeInTheDocument();&lt;br /&gt;
    expect(element_7).toBeInTheDocument();&lt;br /&gt;
    expect(element_8).toBeInTheDocument();&lt;br /&gt;
  });&lt;br /&gt;
&lt;br /&gt;
  test('renders correct links', () =&amp;gt; {&lt;br /&gt;
    render(&amp;lt;Statistics average={''} /&amp;gt;);&lt;br /&gt;
    // Find the scores within the underlined spans&lt;br /&gt;
    const element_1 = screen.getByRole('link', { name: 'show stats' });&lt;br /&gt;
    const element_2 = screen.getByRole('link', { name: 'ssshah26' });&lt;br /&gt;
    const element_3 = screen.getByRole('link', { name: 'Show Reviews' });&lt;br /&gt;
    const element_4 = screen.getByRole('link', { name: 'Show Author Feedback' });&lt;br /&gt;
    &lt;br /&gt;
    // Assert that the elements are present&lt;br /&gt;
    expect(element_1).toBeInTheDocument();&lt;br /&gt;
    expect(element_2).toBeInTheDocument();&lt;br /&gt;
    expect(element_3).toBeInTheDocument();&lt;br /&gt;
    expect(element_4).toBeInTheDocument();&lt;br /&gt;
&lt;br /&gt;
  });&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Testing results ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_statistics_testing_results.png]]&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
* As a student I want to check all grading details of an assignment so that I can know my grade.&lt;br /&gt;
* As a student I want to see my submission of an assignment so that I can check what was submitted for a given assignment.&lt;br /&gt;
* As a student I want to see the names of my group team members so that I can know who I worked with.&lt;br /&gt;
* As a student I want to see the statistics of my grades so that I know my grade distribution.&lt;br /&gt;
* As a student I want to see if I got any late penalties so that I can know whether I got deducted points or not.&lt;br /&gt;
* As a student I want to have a way to view all the reviews that I got for the assignment so that I can read the viewer's responses.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This design document introduces a step-by-step plan for updating the &amp;quot;view-team-grades&amp;quot; page on Expertiza, aiming for a user interface that is visually appealing and simple. Using React and TypeScript, the goal is to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. A clear and flexible UI design makes it not only simple to maintain but also flexible enough for future upgrades. &lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_supporting_code1.png&amp;diff=160781</id>
		<title>File:Simon supporting code1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_supporting_code1.png&amp;diff=160781"/>
		<updated>2024-12-04T07:38:45Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_new_menu_opened.png&amp;diff=160780</id>
		<title>File:Simon new menu opened.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_new_menu_opened.png&amp;diff=160780"/>
		<updated>2024-12-04T07:26:57Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_new_menu_closed.png&amp;diff=160777</id>
		<title>File:Simon new menu closed.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Simon_new_menu_closed.png&amp;diff=160777"/>
		<updated>2024-12-04T07:14:29Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=159899</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=159899"/>
		<updated>2024-12-01T07:50:17Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Actual Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible and Actual Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of statistics table: &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
The statistics table that encompasses the &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes. The changes are highlighted below.&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make it easier to read and understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
The two proposed changes highlighted above were combined to create a new statistics table. Each of the 2 proposed changes introduces good mechanisms for achieving clarity and delivering a visually appealing statistics table to the user. Below is a snapshot of the new statistics table. Notice how easy it is to read and follow the details in the table as opposed to the original table.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/Statistics.tsx&lt;br /&gt;
&lt;br /&gt;
=== 2. Change the Location and Format of Team Member List === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
The team member list is a type of information that should be readily available to the user. Instead, it is placed almost at the bottom of the page. Also, the font size is really small which makes it difficult to locate and read. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the &amp;quot;RoundSelector.tsx&amp;quot; file contains a function and its main purpose is to select the review round. However, its function is also to display the team member list. This violates the single responsibility principle. To fix this issue and allow the &amp;quot;RoundSelector&amp;quot; function to perform one function only, which in this case is to select the review round, it would be wise to move the code to gather and display the team information elsewhere — most likely inside the ReviewTable.tsx file.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of where the team member list is located in the UI. The team member list is outlined in red for visibility:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Notice how small the font size is. Also, the team list should be located at the beginning of the page because it is part of the basic information that should be rendered first.&lt;br /&gt;
&lt;br /&gt;
The current code to gather and display the team member list is located inside the &amp;quot;RoundSelector.tsx&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3b.png|450px]]&lt;br /&gt;
&lt;br /&gt;
Our goal is to change the location of the code snippets that are outlined in red to another location. This change will allow the RoundSelector function to only focus on selecting the review &amp;quot;Rounds&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Place the team list at the top of the page '''  &lt;br /&gt;
The possible location of the team list will be in between the &amp;quot;Team&amp;quot; and &amp;quot;Average peer review score&amp;quot; information. The text format will also be changed. A larger text size will be introduced. These changes will allow the user to locate the list of the names of his/her team.&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Change the location of the code that gathers and displays the team list elsewhere '''&lt;br /&gt;
Changing the location of the code from the &amp;quot;RoundSelector.tsx&amp;quot; file to the &amp;quot;ReviewTable.tsx&amp;quot; file would allow us to fix the violation of the single responsibility principle in &amp;quot;RoundSelector.tsx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
Below is a screenshot of the new location of the team member list outlined in red for visibility. Notice that the team member list is easy to locate as well as easy to read. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Also, we changed the code to gather and display the team member list in the &amp;quot;ReviewTable.tsx&amp;quot; file. The new code snippets added are outlined in red for visibility&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3d.png]]&lt;br /&gt;
&lt;br /&gt;
The new &amp;quot;RoundSelector.tsx&amp;quot; contains the function that is ONLY focussed on selecting the review &amp;quot;Round&amp;quot; and thus obeys the single responsibility principle. A snapshot of the new function is provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3e.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/RoundSelector.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
=== 3.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Place &amp;quot;Export to CSV&amp;quot; and &amp;quot;Export to Excel&amp;quot; buttons below each table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Use libraries like SheetJS (xlsx) to generate the file. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Ensure the exported file matches the table's structure. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt;&amp;lt;button onClick={() =&amp;gt; exportTableData('csv')}&amp;gt;Export to CSV&amp;lt;/button&amp;gt; ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt;&amp;lt;button onClick={() =&amp;gt; exportTableData('xlsx')}&amp;gt;Export to Excel&amp;lt;/button&amp;gt; ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; Last Updated: {lastUpdated ? lastUpdated.toLocaleString() : &amp;quot;Never&amp;quot;} &amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; &amp;lt;button onClick={refreshTableData}&amp;gt;Refresh Data&amp;lt;/button&amp;gt;  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 5.Extending toggle options === &lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
While the heat map provides a great visual representation of the users feedback, with the addition of some 'toggles' we can better idea of the different values. Currently, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: old_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
In this current mode, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
&lt;br /&gt;
[[File: new_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Here, we can see some extended features for showcasing how many reviews left a comment with greater 10 or 20 words. In addition, we added a title to to give some clarity for a better UI/UX experience as well as adding some padding between the toggle form and heat map.&lt;br /&gt;
&lt;br /&gt;
==== Supporting code ====&lt;br /&gt;
[[File: supporting_code.png|600px]]&lt;br /&gt;
&lt;br /&gt;
'showToggle10WordComments' and 'showToggle20WordComments' are boolean values that, if true, will filter over the reviews. When iterating over each review, it first confirms if there is a comment (since comments are defined as a string or undefined). If the comment is a string, it will then filter through each comment to check if its word count is greater than the toggle option (10 or 20). The filter() method returns the number of such comments using the .length property.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTableRow.tsx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 6.Refactoring Code === &lt;br /&gt;
We will work on refactoring some of the code, for example, changing naming conventions along with making sure SOLID principles are being used.&lt;br /&gt;
&lt;br /&gt;
==== Refactoring code 1 ====&lt;br /&gt;
Updated naming convention for a toggle option&lt;br /&gt;
&lt;br /&gt;
Previous:unclear state variable name with no comment&lt;br /&gt;
&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File: supporting_code5.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Refactored: Added a comment to explain what the state was as well as changing the variable name to be more direct.&lt;br /&gt;
[[File: supporting_code4.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* src/pages/ViewTeamGrades/App.tsx&lt;br /&gt;
* src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagram ==&lt;br /&gt;
&lt;br /&gt;
The use case diagram for the &amp;quot;view-team-grades&amp;quot; page after clicking &amp;quot;Grades View&amp;quot; in Expertiza highlights various interactions with the UI. Here's a general outline of possible actors and use cases:&lt;br /&gt;
&lt;br /&gt;
=== Actors: ===&lt;br /&gt;
&lt;br /&gt;
* Student - Primarily interacts with the UI to view all the grading details for an assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases: ===&lt;br /&gt;
 &lt;br /&gt;
* View detailed grade of a particular assignment - Including assignment name, team name, average score, etc.&lt;br /&gt;
* Show Submission - This link redirects the student to a new page where the student can see his/her submission details.&lt;br /&gt;
* Show Stats - This link redirects the student to a new page where the student can see grading statistics.&lt;br /&gt;
* Submitted Work - This table shows the average and range of submitted work grades. &lt;br /&gt;
**Show Reviews - This link located in the &amp;quot;Submitted Work&amp;quot; table redirects the student to the page that renders all the reviews that the student obtained from his/her peers.&lt;br /&gt;
* Author Feedback - This table shows the average and range of author feedback for the submitted work. &lt;br /&gt;
**Show Author Feedback - This link located in the &amp;quot;Author Feedback&amp;quot; table redirects the student to the page that renders the author feedback that the student obtained after writing a review.&lt;br /&gt;
* Teammate Review - This table shows the average and range of teammate reviews for the submitted work.&lt;br /&gt;
* Back - Link that enables the student to go back to the main page&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[File: yusufov_d2.png |750px|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
To validate the newly designed &amp;quot;View Submissions&amp;quot; page's functionality, usability, and performance while meeting the goals of clarity, consistency, flexibility, and intuitivenes. &lt;br /&gt;
&lt;br /&gt;
=== Testing Scope ===&lt;br /&gt;
1. Component Validation&lt;br /&gt;
* Test individual React components like ReviewTable.tsx and Statistics.tsx.&lt;br /&gt;
2. API Integration&lt;br /&gt;
* Verify API calls using useAPI.ts to ensure seamless backend integration.&lt;br /&gt;
3. Dynamic Features&lt;br /&gt;
* Test real-time updates (e.g., &amp;quot;Last Updated&amp;quot; timestamps).&lt;br /&gt;
&lt;br /&gt;
=== Test Cases: ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Test Case ID&lt;br /&gt;
! Test Description&lt;br /&gt;
! Expected Outcome&lt;br /&gt;
! Priority&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
| TC001&lt;br /&gt;
| Verify assignment name display&lt;br /&gt;
| Assignment names appear accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC002&lt;br /&gt;
| Validate &amp;quot;Show Stats&amp;quot; link&lt;br /&gt;
| Redirects to accurate grading statistics page.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC003&lt;br /&gt;
| Test pagination in tables&lt;br /&gt;
| Pagination works correctly for large datasets.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC004&lt;br /&gt;
| Test table export functionality&lt;br /&gt;
| CSV and Excel files match table content accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC005&lt;br /&gt;
| Validate data rendering&lt;br /&gt;
| Tables display data using mock files like `dummyData.json`.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC006&lt;br /&gt;
| Test error handling for missing data&lt;br /&gt;
| UI displays appropriate placeholders or messages for empty datasets.&lt;br /&gt;
| Low&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC007&lt;br /&gt;
| Verify contributor details&lt;br /&gt;
| Names and user IDs are displayed accurately.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC008&lt;br /&gt;
| Validate new thresholds for review length&lt;br /&gt;
| Dynamic thresholds for word/character counts update and display correctly.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
&lt;br /&gt;
Unit Testing:&lt;br /&gt;
*Write tests for individual components like ReviewTable using Jest.&lt;br /&gt;
*Validate utility functions in utils.ts.&lt;br /&gt;
&lt;br /&gt;
Integration Testing:&lt;br /&gt;
* Test the interaction between App.tsx and its child components.&lt;br /&gt;
* Validate API responses using axios_client.ts.&lt;br /&gt;
&lt;br /&gt;
Performance Testing:&lt;br /&gt;
* Simulate exporting large datasets to assess system performance.&lt;br /&gt;
* Measure response times for table rendering with dummyData.json.&lt;br /&gt;
&lt;br /&gt;
Accessibility Testing:&lt;br /&gt;
*Test keyboard navigation and WCAG 2.1 compliance.&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
* As a student I want to check all grading details of an assignment so that I can know my grade.&lt;br /&gt;
* As a student I want to see my submission of an assignment so that I can check what was submitted for a given assignment.&lt;br /&gt;
* As a student I want to see the names of my group team members so that I can know who I worked with.&lt;br /&gt;
* As a student I want to see the statistics of my grades so that I know my grade distribution.&lt;br /&gt;
* As a student I want to see if I got any late penalties so that I can know whether I got deducted points or not.&lt;br /&gt;
* As a student I want to have a way to view all the reviews that I got for the assignment so that I can read the viewer's responses.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This design document introduces a step-by-step plan for updating the &amp;quot;view-team-grades&amp;quot; page on Expertiza, aiming for a user interface that is visually appealing and simple. Using React and TypeScript, the goal is to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. A clear and flexible UI design makes it not only simple to maintain but also flexible enough for future upgrades. &lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=159898</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=159898"/>
		<updated>2024-12-01T07:49:26Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Actual Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible and Actual Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of statistics table: &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
The statistics table that encompasses the &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes. The changes are highlighted below.&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make it easier to read and understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
The two proposed changes highlighted above were combined to create a new statistics table. Each of the 2 proposed changes introduces good mechanisms for achieving clarity and delivering a visually appealing statistics table to the user. Below is a snapshot of the new statistics table. Notice how easy it is to read and follow the details in the table as opposed to the original table.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/Statistics.tsx&lt;br /&gt;
&lt;br /&gt;
=== 2. Change the Location and Format of Team Member List === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
The team member list is a type of information that should be readily available to the user. Instead, it is placed almost at the bottom of the page. Also, the font size is really small which makes it difficult to locate and read. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the &amp;quot;RoundSelector.tsx&amp;quot; file contains a function and its main purpose is to select the review round. However, its function is also to display the team member list. This violates the single responsibility principle. To fix this issue and allow the &amp;quot;RoundSelector&amp;quot; function to perform one function only, which in this case is to select the review round, it would be wise to move the code to gather and display the team information elsewhere — most likely inside the ReviewTable.tsx file.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of where the team member list is located in the UI. The team member list is outlined in red for visibility:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Notice how small the font size is. Also, the team list should be located at the beginning of the page because it is part of the basic information that should be rendered first.&lt;br /&gt;
&lt;br /&gt;
The current code to gather and display the team member list is located inside the &amp;quot;RoundSelector.tsx&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3b.png|450px]]&lt;br /&gt;
&lt;br /&gt;
Our goal is to change the location of the code snippets that are outlined in red to another location. This change will allow the RoundSelector function to only focus on selecting the review &amp;quot;Rounds&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Place the team list at the top of the page '''  &lt;br /&gt;
The possible location of the team list will be in between the &amp;quot;Team&amp;quot; and &amp;quot;Average peer review score&amp;quot; information. The text format will also be changed. A larger text size will be introduced. These changes will allow the user to locate the list of the names of his/her team.&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Change the location of the code that gathers and displays the team list elsewhere '''&lt;br /&gt;
Changing the location of the code from the &amp;quot;RoundSelector.tsx&amp;quot; file to the &amp;quot;ReviewTable.tsx&amp;quot; file would allow us to fix the violation of the single responsibility principle in &amp;quot;RoundSelector.tsx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
Below is a screenshot of the new location of the team member list outlined in red for visibility. Notice that the team member list is easy to locate as well as easy to read. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Also, we changed the code to gather and display the team member list in the &amp;quot;ReviewTable.tsx&amp;quot; file. The new code snippets added are outlined in red for visibility&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3d.png]]&lt;br /&gt;
&lt;br /&gt;
The new &amp;quot;RoundSelector.tsx&amp;quot; contains the function that is ONLY focussed on selecting the review &amp;quot;Round&amp;quot; and thus obeys the single responsibility principle. A snapshot of the new function is provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3e.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/RoundSelector.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
=== 3.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Place &amp;quot;Export to CSV&amp;quot; and &amp;quot;Export to Excel&amp;quot; buttons below each table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Use libraries like SheetJS (xlsx) to generate the file. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Ensure the exported file matches the table's structure. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt;&amp;lt;button onClick={() =&amp;gt; exportTableData('csv')}&amp;gt;Export to CSV&amp;lt;/button&amp;gt; ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt;&amp;lt;button onClick={() =&amp;gt; exportTableData('xlsx')}&amp;gt;Export to Excel&amp;lt;/button&amp;gt; ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; Last Updated: {lastUpdated ? lastUpdated.toLocaleString() : &amp;quot;Never&amp;quot;} &amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; &amp;lt;button onClick={refreshTableData}&amp;gt;Refresh Data&amp;lt;/button&amp;gt;  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 5.Extending toggle options === &lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
While the heat map provides a great visual representation of the users feedback, with the addition of some 'toggles' we can better idea of the different values. Currently, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: old_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
In this current mode, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
&lt;br /&gt;
[[File: new_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Here, we can see some extended features for showcasing how many reviews left a comment with greater 10 or 20 words. In addition, we added a title to to give some clarity and better UI/UX as well as adding some padding below using tailwind css.&lt;br /&gt;
&lt;br /&gt;
==== Supporting code ====&lt;br /&gt;
[[File: supporting_code.png|600px]]&lt;br /&gt;
&lt;br /&gt;
'showToggle10WordComments' and 'showToggle20WordComments' are boolean values that, if true, will filter over the reviews. When iterating over each review, it first confirms if there is a comment (since comments are defined as a string or undefined). If the comment is a string, it will then filter through each comment to check if its word count is greater than the toggle option (10 or 20). The filter() method returns the number of such comments using the .length property.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTableRow.tsx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 6.Refactoring Code === &lt;br /&gt;
We will work on refactoring some of the code, for example, changing naming conventions along with making sure SOLID principles are being used.&lt;br /&gt;
&lt;br /&gt;
==== Refactoring code 1 ====&lt;br /&gt;
Updated naming convention for a toggle option&lt;br /&gt;
&lt;br /&gt;
Previous:unclear state variable name with no comment&lt;br /&gt;
&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File: supporting_code5.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Refactored: Added a comment to explain what the state was as well as changing the variable name to be more direct.&lt;br /&gt;
[[File: supporting_code4.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* src/pages/ViewTeamGrades/App.tsx&lt;br /&gt;
* src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagram ==&lt;br /&gt;
&lt;br /&gt;
The use case diagram for the &amp;quot;view-team-grades&amp;quot; page after clicking &amp;quot;Grades View&amp;quot; in Expertiza highlights various interactions with the UI. Here's a general outline of possible actors and use cases:&lt;br /&gt;
&lt;br /&gt;
=== Actors: ===&lt;br /&gt;
&lt;br /&gt;
* Student - Primarily interacts with the UI to view all the grading details for an assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases: ===&lt;br /&gt;
 &lt;br /&gt;
* View detailed grade of a particular assignment - Including assignment name, team name, average score, etc.&lt;br /&gt;
* Show Submission - This link redirects the student to a new page where the student can see his/her submission details.&lt;br /&gt;
* Show Stats - This link redirects the student to a new page where the student can see grading statistics.&lt;br /&gt;
* Submitted Work - This table shows the average and range of submitted work grades. &lt;br /&gt;
**Show Reviews - This link located in the &amp;quot;Submitted Work&amp;quot; table redirects the student to the page that renders all the reviews that the student obtained from his/her peers.&lt;br /&gt;
* Author Feedback - This table shows the average and range of author feedback for the submitted work. &lt;br /&gt;
**Show Author Feedback - This link located in the &amp;quot;Author Feedback&amp;quot; table redirects the student to the page that renders the author feedback that the student obtained after writing a review.&lt;br /&gt;
* Teammate Review - This table shows the average and range of teammate reviews for the submitted work.&lt;br /&gt;
* Back - Link that enables the student to go back to the main page&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[File: yusufov_d2.png |750px|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
To validate the newly designed &amp;quot;View Submissions&amp;quot; page's functionality, usability, and performance while meeting the goals of clarity, consistency, flexibility, and intuitivenes. &lt;br /&gt;
&lt;br /&gt;
=== Testing Scope ===&lt;br /&gt;
1. Component Validation&lt;br /&gt;
* Test individual React components like ReviewTable.tsx and Statistics.tsx.&lt;br /&gt;
2. API Integration&lt;br /&gt;
* Verify API calls using useAPI.ts to ensure seamless backend integration.&lt;br /&gt;
3. Dynamic Features&lt;br /&gt;
* Test real-time updates (e.g., &amp;quot;Last Updated&amp;quot; timestamps).&lt;br /&gt;
&lt;br /&gt;
=== Test Cases: ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Test Case ID&lt;br /&gt;
! Test Description&lt;br /&gt;
! Expected Outcome&lt;br /&gt;
! Priority&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
| TC001&lt;br /&gt;
| Verify assignment name display&lt;br /&gt;
| Assignment names appear accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC002&lt;br /&gt;
| Validate &amp;quot;Show Stats&amp;quot; link&lt;br /&gt;
| Redirects to accurate grading statistics page.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC003&lt;br /&gt;
| Test pagination in tables&lt;br /&gt;
| Pagination works correctly for large datasets.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC004&lt;br /&gt;
| Test table export functionality&lt;br /&gt;
| CSV and Excel files match table content accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC005&lt;br /&gt;
| Validate data rendering&lt;br /&gt;
| Tables display data using mock files like `dummyData.json`.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC006&lt;br /&gt;
| Test error handling for missing data&lt;br /&gt;
| UI displays appropriate placeholders or messages for empty datasets.&lt;br /&gt;
| Low&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC007&lt;br /&gt;
| Verify contributor details&lt;br /&gt;
| Names and user IDs are displayed accurately.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC008&lt;br /&gt;
| Validate new thresholds for review length&lt;br /&gt;
| Dynamic thresholds for word/character counts update and display correctly.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
&lt;br /&gt;
Unit Testing:&lt;br /&gt;
*Write tests for individual components like ReviewTable using Jest.&lt;br /&gt;
*Validate utility functions in utils.ts.&lt;br /&gt;
&lt;br /&gt;
Integration Testing:&lt;br /&gt;
* Test the interaction between App.tsx and its child components.&lt;br /&gt;
* Validate API responses using axios_client.ts.&lt;br /&gt;
&lt;br /&gt;
Performance Testing:&lt;br /&gt;
* Simulate exporting large datasets to assess system performance.&lt;br /&gt;
* Measure response times for table rendering with dummyData.json.&lt;br /&gt;
&lt;br /&gt;
Accessibility Testing:&lt;br /&gt;
*Test keyboard navigation and WCAG 2.1 compliance.&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
* As a student I want to check all grading details of an assignment so that I can know my grade.&lt;br /&gt;
* As a student I want to see my submission of an assignment so that I can check what was submitted for a given assignment.&lt;br /&gt;
* As a student I want to see the names of my group team members so that I can know who I worked with.&lt;br /&gt;
* As a student I want to see the statistics of my grades so that I know my grade distribution.&lt;br /&gt;
* As a student I want to see if I got any late penalties so that I can know whether I got deducted points or not.&lt;br /&gt;
* As a student I want to have a way to view all the reviews that I got for the assignment so that I can read the viewer's responses.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This design document introduces a step-by-step plan for updating the &amp;quot;view-team-grades&amp;quot; page on Expertiza, aiming for a user interface that is visually appealing and simple. Using React and TypeScript, the goal is to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. A clear and flexible UI design makes it not only simple to maintain but also flexible enough for future upgrades. &lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=159897</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=159897"/>
		<updated>2024-12-01T07:48:13Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Detail Description of Possible and Actual Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible and Actual Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of statistics table: &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
&lt;br /&gt;
The statistics table that encompasses the &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes. The changes are highlighted below.&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make it easier to read and understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
The two proposed changes highlighted above were combined to create a new statistics table. Each of the 2 proposed changes introduces good mechanisms for achieving clarity and delivering a visually appealing statistics table to the user. Below is a snapshot of the new statistics table. Notice how easy it is to read and follow the details in the table as opposed to the original table.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/Statistics.tsx&lt;br /&gt;
&lt;br /&gt;
=== 2. Change the Location and Format of Team Member List === &lt;br /&gt;
==== Rationale ====&lt;br /&gt;
The team member list is a type of information that should be readily available to the user. Instead, it is placed almost at the bottom of the page. Also, the font size is really small which makes it difficult to locate and read. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the &amp;quot;RoundSelector.tsx&amp;quot; file contains a function and its main purpose is to select the review round. However, its function is also to display the team member list. This violates the single responsibility principle. To fix this issue and allow the &amp;quot;RoundSelector&amp;quot; function to perform one function only, which in this case is to select the review round, it would be wise to move the code to gather and display the team information elsewhere — most likely inside the ReviewTable.tsx file.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of where the team member list is located in the UI. The team member list is outlined in red for visibility:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3a.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Notice how small the font size is. Also, the team list should be located at the beginning of the page because it is part of the basic information that should be rendered first.&lt;br /&gt;
&lt;br /&gt;
The current code to gather and display the team member list is located inside the &amp;quot;RoundSelector.tsx&amp;quot; file&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3b.png|450px]]&lt;br /&gt;
&lt;br /&gt;
Our goal is to change the location of the code snippets that are outlined in red to another location. This change will allow the RoundSelector function to only focus on selecting the review &amp;quot;Rounds&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Possible Changes ====&lt;br /&gt;
&lt;br /&gt;
* ''' 1. Place the team list at the top of the page '''  &lt;br /&gt;
The possible location of the team list will be in between the &amp;quot;Team&amp;quot; and &amp;quot;Average peer review score&amp;quot; information. The text format will also be changed. A larger text size will be introduced. These changes will allow the user to locate the list of the names of his/her team.&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Change the location of the code that gathers and displays the team list elsewhere '''&lt;br /&gt;
Changing the location of the code from the &amp;quot;RoundSelector.tsx&amp;quot; file to the &amp;quot;ReviewTable.tsx&amp;quot; file would allow us to fix the violation of the single responsibility principle in &amp;quot;RoundSelector.tsx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
Below is a screenshot of the new location of the team member list outlined in red for visibility. Notice that the team member list is easy to locate as well as easy to read. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3c.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Also, we changed the code to gather and display the team member list in the &amp;quot;ReviewTable.tsx&amp;quot; file. The new code snippets added are outlined in red for visibility&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3d.png]]&lt;br /&gt;
&lt;br /&gt;
The new &amp;quot;RoundSelector.tsx&amp;quot; contains the function that is ONLY focussed on selecting the review &amp;quot;Round&amp;quot; and thus obeys the single responsibility principle. A snapshot of the new function is provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_3e.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/RoundSelector.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
=== 3.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Place &amp;quot;Export to CSV&amp;quot; and &amp;quot;Export to Excel&amp;quot; buttons below each table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Use libraries like SheetJS (xlsx) to generate the file. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Ensure the exported file matches the table's structure. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt;&amp;lt;button onClick={() =&amp;gt; exportTableData('csv')}&amp;gt;Export to CSV&amp;lt;/button&amp;gt; ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt;&amp;lt;button onClick={() =&amp;gt; exportTableData('xlsx')}&amp;gt;Export to Excel&amp;lt;/button&amp;gt; ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; Last Updated: {lastUpdated ? lastUpdated.toLocaleString() : &amp;quot;Never&amp;quot;} &amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; &amp;lt;button onClick={refreshTableData}&amp;gt;Refresh Data&amp;lt;/button&amp;gt;  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 5.Extending toggle options === &lt;br /&gt;
&lt;br /&gt;
==== Rationale ====&lt;br /&gt;
While the heat map provides a great visual representation of the users feedback, with the addition of some 'toggles' we can better idea of the different values. Currently, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Existing Design ====&lt;br /&gt;
&lt;br /&gt;
[[File: old_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
In this current mode, there is only the option to toggle for the questions.&lt;br /&gt;
&lt;br /&gt;
==== Actual Changes ====&lt;br /&gt;
&lt;br /&gt;
[[File: new_toggle_sc.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
Here, we can see some extended features for showcasing how many reviews left a comment with greater 10 or 20 words.&lt;br /&gt;
&lt;br /&gt;
==== Supporting code ====&lt;br /&gt;
[[File: supporting_code.png|600px]]&lt;br /&gt;
&lt;br /&gt;
'showToggle10WordComments' and 'showToggle20WordComments' are boolean values that, if true, will filter over the reviews. When iterating over each review, it first confirms if there is a comment (since comments are defined as a string or undefined). If the comment is a string, it will then filter through each comment to check if its word count is greater than the toggle option (10 or 20). The filter() method returns the number of such comments using the .length property.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ''' Updated Files '''&lt;br /&gt;
&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
   src/pages/ViewTeamGrades/ReviewTableRow.tsx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 6.Refactoring Code === &lt;br /&gt;
We will work on refactoring some of the code, for example, changing naming conventions along with making sure SOLID principles are being used.&lt;br /&gt;
&lt;br /&gt;
==== Refactoring code 1 ====&lt;br /&gt;
Updated naming convention for a toggle option&lt;br /&gt;
&lt;br /&gt;
Previous:unclear state variable name with no comment&lt;br /&gt;
&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
[[File: supporting_code5.png|600px]]&lt;br /&gt;
&lt;br /&gt;
Refactored: Added a comment to explain what the state was as well as changing the variable name to be more direct.&lt;br /&gt;
[[File: supporting_code4.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* src/pages/ViewTeamGrades/App.tsx&lt;br /&gt;
* src/pages/ViewTeamGrades/ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== Use Case Diagram ==&lt;br /&gt;
&lt;br /&gt;
The use case diagram for the &amp;quot;view-team-grades&amp;quot; page after clicking &amp;quot;Grades View&amp;quot; in Expertiza highlights various interactions with the UI. Here's a general outline of possible actors and use cases:&lt;br /&gt;
&lt;br /&gt;
=== Actors: ===&lt;br /&gt;
&lt;br /&gt;
* Student - Primarily interacts with the UI to view all the grading details for an assignment.&lt;br /&gt;
&lt;br /&gt;
=== Use Cases: ===&lt;br /&gt;
 &lt;br /&gt;
* View detailed grade of a particular assignment - Including assignment name, team name, average score, etc.&lt;br /&gt;
* Show Submission - This link redirects the student to a new page where the student can see his/her submission details.&lt;br /&gt;
* Show Stats - This link redirects the student to a new page where the student can see grading statistics.&lt;br /&gt;
* Submitted Work - This table shows the average and range of submitted work grades. &lt;br /&gt;
**Show Reviews - This link located in the &amp;quot;Submitted Work&amp;quot; table redirects the student to the page that renders all the reviews that the student obtained from his/her peers.&lt;br /&gt;
* Author Feedback - This table shows the average and range of author feedback for the submitted work. &lt;br /&gt;
**Show Author Feedback - This link located in the &amp;quot;Author Feedback&amp;quot; table redirects the student to the page that renders the author feedback that the student obtained after writing a review.&lt;br /&gt;
* Teammate Review - This table shows the average and range of teammate reviews for the submitted work.&lt;br /&gt;
* Back - Link that enables the student to go back to the main page&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[File: yusufov_d2.png |750px|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
To validate the newly designed &amp;quot;View Submissions&amp;quot; page's functionality, usability, and performance while meeting the goals of clarity, consistency, flexibility, and intuitivenes. &lt;br /&gt;
&lt;br /&gt;
=== Testing Scope ===&lt;br /&gt;
1. Component Validation&lt;br /&gt;
* Test individual React components like ReviewTable.tsx and Statistics.tsx.&lt;br /&gt;
2. API Integration&lt;br /&gt;
* Verify API calls using useAPI.ts to ensure seamless backend integration.&lt;br /&gt;
3. Dynamic Features&lt;br /&gt;
* Test real-time updates (e.g., &amp;quot;Last Updated&amp;quot; timestamps).&lt;br /&gt;
&lt;br /&gt;
=== Test Cases: ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Test Case ID&lt;br /&gt;
! Test Description&lt;br /&gt;
! Expected Outcome&lt;br /&gt;
! Priority&lt;br /&gt;
! Status&lt;br /&gt;
|-&lt;br /&gt;
| TC001&lt;br /&gt;
| Verify assignment name display&lt;br /&gt;
| Assignment names appear accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC002&lt;br /&gt;
| Validate &amp;quot;Show Stats&amp;quot; link&lt;br /&gt;
| Redirects to accurate grading statistics page.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC003&lt;br /&gt;
| Test pagination in tables&lt;br /&gt;
| Pagination works correctly for large datasets.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC004&lt;br /&gt;
| Test table export functionality&lt;br /&gt;
| CSV and Excel files match table content accurately.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC005&lt;br /&gt;
| Validate data rendering&lt;br /&gt;
| Tables display data using mock files like `dummyData.json`.&lt;br /&gt;
| High&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC006&lt;br /&gt;
| Test error handling for missing data&lt;br /&gt;
| UI displays appropriate placeholders or messages for empty datasets.&lt;br /&gt;
| Low&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC007&lt;br /&gt;
| Verify contributor details&lt;br /&gt;
| Names and user IDs are displayed accurately.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|-&lt;br /&gt;
| TC008&lt;br /&gt;
| Validate new thresholds for review length&lt;br /&gt;
| Dynamic thresholds for word/character counts update and display correctly.&lt;br /&gt;
| Medium&lt;br /&gt;
| Pending&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
&lt;br /&gt;
Unit Testing:&lt;br /&gt;
*Write tests for individual components like ReviewTable using Jest.&lt;br /&gt;
*Validate utility functions in utils.ts.&lt;br /&gt;
&lt;br /&gt;
Integration Testing:&lt;br /&gt;
* Test the interaction between App.tsx and its child components.&lt;br /&gt;
* Validate API responses using axios_client.ts.&lt;br /&gt;
&lt;br /&gt;
Performance Testing:&lt;br /&gt;
* Simulate exporting large datasets to assess system performance.&lt;br /&gt;
* Measure response times for table rendering with dummyData.json.&lt;br /&gt;
&lt;br /&gt;
Accessibility Testing:&lt;br /&gt;
*Test keyboard navigation and WCAG 2.1 compliance.&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
* As a student I want to check all grading details of an assignment so that I can know my grade.&lt;br /&gt;
* As a student I want to see my submission of an assignment so that I can check what was submitted for a given assignment.&lt;br /&gt;
* As a student I want to see the names of my group team members so that I can know who I worked with.&lt;br /&gt;
* As a student I want to see the statistics of my grades so that I know my grade distribution.&lt;br /&gt;
* As a student I want to see if I got any late penalties so that I can know whether I got deducted points or not.&lt;br /&gt;
* As a student I want to have a way to view all the reviews that I got for the assignment so that I can read the viewer's responses.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
This design document introduces a step-by-step plan for updating the &amp;quot;view-team-grades&amp;quot; page on Expertiza, aiming for a user interface that is visually appealing and simple. Using React and TypeScript, the goal is to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. A clear and flexible UI design makes it not only simple to maintain but also flexible enough for future upgrades. &lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Supporting_code4.png&amp;diff=159896</id>
		<title>File:Supporting code4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Supporting_code4.png&amp;diff=159896"/>
		<updated>2024-12-01T07:45:37Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Supporting_code5.png&amp;diff=159895</id>
		<title>File:Supporting code5.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Supporting_code5.png&amp;diff=159895"/>
		<updated>2024-12-01T07:45:20Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Supporting_code.png&amp;diff=159894</id>
		<title>File:Supporting code.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Supporting_code.png&amp;diff=159894"/>
		<updated>2024-12-01T07:27:16Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:New_toggle_sc.png&amp;diff=159893</id>
		<title>File:New toggle sc.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:New_toggle_sc.png&amp;diff=159893"/>
		<updated>2024-12-01T07:26:05Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: Sgetahu uploaded a new version of File:New toggle sc.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Old_toggle_sc.png&amp;diff=159892</id>
		<title>File:Old toggle sc.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Old_toggle_sc.png&amp;diff=159892"/>
		<updated>2024-12-01T07:14:17Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:New_toggle_sc.png&amp;diff=159891</id>
		<title>File:New toggle sc.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:New_toggle_sc.png&amp;diff=159891"/>
		<updated>2024-12-01T07:13:53Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=159473</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=159473"/>
		<updated>2024-11-13T04:51:33Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* 4.Extend feature in view team grade page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables === &lt;br /&gt;
The &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png]]&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables are and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes:&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make them more easy to read and easy to understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png]]&lt;br /&gt;
&lt;br /&gt;
=== 2.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Place &amp;quot;Export to CSV&amp;quot; and &amp;quot;Export to Excel&amp;quot; buttons below each table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Use libraries like SheetJS (xlsx) to generate the file. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Ensure the exported file matches the table's structure. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt;&amp;lt;button onClick={() =&amp;gt; exportTableData('csv')}&amp;gt;Export to CSV&amp;lt;/button&amp;gt; ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt;&amp;lt;button onClick={() =&amp;gt; exportTableData('xlsx')}&amp;gt;Export to Excel&amp;lt;/button&amp;gt; ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 3.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; Last Updated: {lastUpdated ? lastUpdated.toLocaleString() : &amp;quot;Never&amp;quot;} &amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; &amp;lt;button onClick={refreshTableData}&amp;gt;Refresh Data&amp;lt;/button&amp;gt;  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4.Extend feature in view team grade page === &lt;br /&gt;
&lt;br /&gt;
On the view team grade page, there is currently a feature that shows the count of reviews containing &amp;gt;10 and &amp;gt;20 words. &lt;br /&gt;
&lt;br /&gt;
- We would like to extend this feature by adding a text input field, allowing users to dynamically set a custom word count threshold.&lt;br /&gt;
&amp;lt;div class=&amp;quot;clear&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
- Another option would be to allow the user to also check review length based on character count instead of word count.&lt;br /&gt;
&lt;br /&gt;
=== 5.Refactoring Code === &lt;br /&gt;
We will work on refactoring some of the code, for example, changing naming conventions along with making sure SOLID principles are being used.&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* App.tsx&lt;br /&gt;
* ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=159472</id>
		<title>CSC/ECE 517 Fall 2024 - E2492. UI for View submissions/assign grades (except heatgrid)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2492._UI_for_View_submissions/assign_grades_(except_heatgrid)&amp;diff=159472"/>
		<updated>2024-11-13T04:50:11Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Detail Description of Possible Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
=== Project Overview ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;View Submissions&amp;quot; project focuses on developing a user interface (UI) &lt;br /&gt;
to maintain the score of reviewer submissions.&lt;br /&gt;
&lt;br /&gt;
The Peer Review Summary Page UI is designed to display essential information for each review&lt;br /&gt;
assignment in a streamlined and user-friendly format. It provides a clear overview of contributors&lt;br /&gt;
and assigned reviewers, with interactive options such as &amp;quot;Unsubmit&amp;quot; and &amp;quot;Delete&amp;quot; to manage&lt;br /&gt;
submissions easily. Meta-reviewer options are intentionally excluded to keep the interface&lt;br /&gt;
focused solely on core reviewer functionalities. Additional sections are included to display&lt;br /&gt;
missing reviews, add grades and comments, and create an efficient and straightforward&lt;br /&gt;
interface for managing peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Design Goals ==&lt;br /&gt;
The Peer Review Summary Page in this project is designed to display essential information for each review assignment in a streamlined and user-friendly format. The main objectives focus on consistency and clearness, minimalism, flexibility, and intuitivism:&lt;br /&gt;
&lt;br /&gt;
* '''Consistency and clearness: '''The Peer Review Summary Page UI interface should be consistent and clear. &lt;br /&gt;
&lt;br /&gt;
* ''' Minimalism: '''The Peer Review Summary Page UI interface is very cluttered and there is so much going on in the page which makes it hard for a student to navigate through the information that is being displayed. We aim to avoid cluttering the interface with too much information.&lt;br /&gt;
&lt;br /&gt;
* ''' Flexibility: '''The Peer Review Summary Page UI interface should be flexible and avoid clutter. We aim to deliver flexibility by rearranging information around the page to make it more presentable and easy to read.&lt;br /&gt;
&lt;br /&gt;
* '''Intuitivism: '''The Peer Review Summary Page UI interface should be easy to use and understand. At the moment, the UI shows a few confusing and hard-to-understand areas/blocks (such as the &amp;quot;Submitted Work&amp;quot; table). We aim to make these areas less confusing by changing the way these blocks are being displayed.&lt;br /&gt;
&lt;br /&gt;
These objectives ensure that students can efficiently see their grade details for a particular project, such as project title, team name, average peer review score, and peer review scores for each received review, and perform essential actions like show submission, show reviews, show author feedback, and show stats. &lt;br /&gt;
&lt;br /&gt;
Through these design goals, we aim to deliver a more user-friendly solution that enhances the functionality and manageability of grade information for a particular project within the Expertiza system. The project leverages ReactJS and TypeScript to achieve these objectives, ensuring a modern, consistent, and flexible interface.&lt;br /&gt;
&lt;br /&gt;
== Current UI Layout ==&lt;br /&gt;
The image below refers to the current UI layout. As shown in the image, the UI looks very cluttered and it is hard to find information in it. It has so many links and descriptions scattered around the page without any order. This makes it hard for a student to find information quickly. &lt;br /&gt;
&lt;br /&gt;
[[File: loyda_layout1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
With the objectives that were mentioned in the previous section and the possible changes that are discussed next, we hope to alleviate the clutter and make the UI more visually appealing.&lt;br /&gt;
&lt;br /&gt;
== Detail Description of Possible Changes ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Intuitive Display of &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables === &lt;br /&gt;
The &amp;quot;Submitted Work&amp;quot;, &amp;quot;Author Feedback&amp;quot;, and &amp;quot;Teammate Review&amp;quot; tables lack contrast which makes them hard to understand and hard to read. Below is a snapshot of their locations in the current UI:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_1.png]]&lt;br /&gt;
&lt;br /&gt;
Notice how hard it is to visualize the tables are and how hard it is to follow the information that they are providing. Our goal is to make these tables more visually appealing by introducing 2 possible changes:&lt;br /&gt;
* ''' 1. Introduce shading '''  &lt;br /&gt;
One of the possible approaches to fixing this issue is to Introduce color by filling each table with a different color.&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2b.png]]&lt;br /&gt;
&lt;br /&gt;
* ''' 2. Introducing outside borders: ''' &lt;br /&gt;
Another possible solution to this issue is to add an outside border to each table to make them more easy to read and easy to understand. After adding table borders, the tables are expected to be displayed as follows:&lt;br /&gt;
&lt;br /&gt;
[[File: loyda_2a.png]]&lt;br /&gt;
&lt;br /&gt;
=== 2.Export Options for Tables === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users cannot save or analyze table data outside the user interface. This makes it difficult to share or process data for further analysis.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add export buttons below each table to allow users to download the data as CSV, Excel, or PDF files. This will increase the flexibility and utility of the tables.&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Place &amp;quot;Export to CSV&amp;quot; and &amp;quot;Export to Excel&amp;quot; buttons below each table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Use libraries like SheetJS (xlsx) to generate the file. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Ensure the exported file matches the table's structure. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt;&amp;lt;button onClick={() =&amp;gt; exportTableData('csv')}&amp;gt;Export to CSV&amp;lt;/button&amp;gt; ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt;&amp;lt;button onClick={() =&amp;gt; exportTableData('xlsx')}&amp;gt;Export to Excel&amp;lt;/button&amp;gt; ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 3.Improved Feedback Indicators === &lt;br /&gt;
&lt;br /&gt;
'''Current Limitation:'''&lt;br /&gt;
Users have no indication of when table data was last updated, leading to potential uncertainty about its accuracy.&lt;br /&gt;
&lt;br /&gt;
'''Proposed Solution:'''&lt;br /&gt;
Add &amp;quot;Last Updated&amp;quot; timestamps or live refresh indicators for each table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Implementation Details:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 1. Include a &amp;quot;Last Updated: [Date/Time]&amp;quot; label below the table. ‎&amp;lt;br&amp;gt; &lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 2. Update the timestamp dynamically whenever the data source is refreshed. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; 3. Use a subtle spinning loader icon to indicate data refreshing. ‎&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Supporting Code:'''&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; Last Updated: {lastUpdated ? lastUpdated.toLocaleString() : &amp;quot;Never&amp;quot;} &amp;lt;br&amp;gt;&lt;br /&gt;
 ‎&amp;lt;br&amp;gt; &amp;lt;button onClick={refreshTableData}&amp;gt;Refresh Data&amp;lt;/button&amp;gt;  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4.Extend feature in view team grade page === &lt;br /&gt;
&lt;br /&gt;
On the view team grade page, there is currently a feature that shows the count of reviews containing &amp;gt;10 and &amp;gt;20 words. &lt;br /&gt;
&lt;br /&gt;
- We would like to extend this feature by adding a text input field, allowing users to dynamically set a custom word count threshold.&lt;br /&gt;
- Another option would be to allow the user to also check review length based on character count instead of word count.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 5.Refactoring Code === &lt;br /&gt;
We will work on refactoring some of the code, for example, changing naming conventions along with making sure SOLID principles are being used.&lt;br /&gt;
&lt;br /&gt;
== Frontend (React &amp;amp; TypeScript) ==&lt;br /&gt;
=== Files to be potentially modified ===&lt;br /&gt;
All files to be modified are located in the src/pages/ViewTeamGrades folder. The files that will potentially be modified are:&lt;br /&gt;
&lt;br /&gt;
* App.tsx&lt;br /&gt;
* ReviewTable.tsx&lt;br /&gt;
&lt;br /&gt;
== User Stories ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
== List of Project Links ==&lt;br /&gt;
GitHub Repository: https://github.com/simong2/reimplementation-front-end&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
'''Nainisha Bhallamudi''' (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
* '''Simon Getahun''' (unityid: sgetahu, github: https://github.com/simong2)&lt;br /&gt;
* '''Anusha Akkireddy''' (unityid: aakkire, github:https://github.com/akkireddyanusha)&lt;br /&gt;
* '''Loyda Yusufova''' (unityid: leyusufo, github: https://github.com/leyusufo)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158588</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158588"/>
		<updated>2024-10-30T08:17:36Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Email Notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# Changed mailer function for team addition confirmation&lt;br /&gt;
# Add HTML partials for dual role&lt;br /&gt;
# Correct mailer function calls when users/mentors are added&lt;br /&gt;
# Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
Here is the previous PR created of the add_member function. The goal of this was to send a notification when members were added.&lt;br /&gt;
[[File:Add member email.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on the professor's feedback that a mentor can also be a participant, we adjusted the role checking logic to account for all use cases.&lt;br /&gt;
[[File:add_member_snippet_code.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code now checks if a user is both a mentor and a participant using MentorManagement.user_a_mentor?(user) and user.is_a?(Participant). If the user is a mentor but not a participant, it sends the mentor notification. If the user is only a participant (not a mentor), it sends the participant notification.&lt;br /&gt;
If the user is both a mentor and a participant, it sends a single notification email to say that they hold both roles.&lt;br /&gt;
&lt;br /&gt;
New HTML partial format for dual role:&lt;br /&gt;
[[File:dual_role_html_partial.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The remaining implementation follows this style by fixing the conditional logic for sending emails to the correct user and adding a test for the new dual role route.&lt;br /&gt;
&lt;br /&gt;
[[File:test_dual_role.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/ExtremeMachine12/expertiza/pull/21&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Test_dual_role.png&amp;diff=158587</id>
		<title>File:Test dual role.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Test_dual_role.png&amp;diff=158587"/>
		<updated>2024-10-30T08:17:22Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158586</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158586"/>
		<updated>2024-10-30T08:13:50Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Email Notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# Changed mailer function for team addition confirmation&lt;br /&gt;
# Add HTML partials for dual role&lt;br /&gt;
# Correct mailer function calls when users/mentors are added&lt;br /&gt;
# Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
Here is the previous PR created of the add_member function. The goal of this was to send a notification when members were added.&lt;br /&gt;
[[File:Add member email.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on the professor's feedback that a mentor can also be a participant, we adjusted the role checking logic to account for all use cases.&lt;br /&gt;
[[File:add_member_snippet_code.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code now checks if a user is both a mentor and a participant using MentorManagement.user_a_mentor?(user) and user.is_a?(Participant). If the user is a mentor but not a participant, it sends the mentor notification. If the user is only a participant (not a mentor), it sends the participant notification.&lt;br /&gt;
If the user is both a mentor and a participant, it sends a single notification email to say that they hold both roles.&lt;br /&gt;
&lt;br /&gt;
New HTML partial format for dual role:&lt;br /&gt;
[[File:dual_role_html_partial.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/ExtremeMachine12/expertiza/pull/21&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158585</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158585"/>
		<updated>2024-10-30T08:13:16Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Email Notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# Changed mailer function for team addition confirmation&lt;br /&gt;
# Add HTML partials for dual role&lt;br /&gt;
# Correct mailer function calls when users/mentors are added&lt;br /&gt;
# Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
Here is the previous PR created of the add_member function. The goal of this was to send a notification when members were added.&lt;br /&gt;
[[File:Add member email.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on the professor's feedback that a mentor can also be a participant, we adjusted the role checking logic to account for all use cases.&lt;br /&gt;
[[File:add_member_snippet_code.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code now checks if a user is both a mentor and a participant using MentorManagement.user_a_mentor?(user) and user.is_a?(Participant). If the user is a mentor but not a participant, it sends the mentor notification. If the user is only a participant (not a mentor), it sends the participant notification.&lt;br /&gt;
If the user is both a mentor and a participant, it sends a single notification email to say that they hold both roles.&lt;br /&gt;
&lt;br /&gt;
New HTML partial format for dual role:&lt;br /&gt;
[[File:dual_role_html_partial.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The remaining implementations follow this style by fixing the conditional logic for sending emails to the correct user and adding a test for the new dual role route.&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/ExtremeMachine12/expertiza/pull/21&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158584</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158584"/>
		<updated>2024-10-30T08:05:04Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Email Notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# Changed mailer function for team addition confirmation&lt;br /&gt;
# Add HTML partials for dual role&lt;br /&gt;
# Correct mailer function calls when users/mentors are added&lt;br /&gt;
# Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
Here is the previous PR created of the add_member function. The goal of this was to send a notification when members were added.&lt;br /&gt;
[[File:Add member email.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on the professor's feedback that a mentor can also be a participant, we adjusted the role checking logic to account for all use cases.&lt;br /&gt;
[[File:add_member_snippet_code.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code now checks if a user is both a mentor and a participant using MentorManagement.user_a_mentor?(user) and user.is_a?(Participant). If the user is a mentor but not a participant, it sends the mentor notification. If the user is only a participant (not a mentor), it sends the participant notification.&lt;br /&gt;
If the user is both a mentor and a participant, it sends a single notification email to say that they hold both roles.&lt;br /&gt;
&lt;br /&gt;
New HTML partial format for dual role:&lt;br /&gt;
[[File:dual_role_html_partial.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/ExtremeMachine12/expertiza/pull/21&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Dual_role_html_partial.png&amp;diff=158583</id>
		<title>File:Dual role html partial.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Dual_role_html_partial.png&amp;diff=158583"/>
		<updated>2024-10-30T08:04:35Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158402</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158402"/>
		<updated>2024-10-30T03:08:40Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Email Notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# Changed mailer function for team addition confirmation&lt;br /&gt;
# Add HTML partials for dual role&lt;br /&gt;
# Correct mailer function calls when users/mentors are added&lt;br /&gt;
# Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
Here is the previous PR created of the add_member function. The goal of this was to send a notification when members were added.&lt;br /&gt;
[[File:Add member email.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on the professor's feedback that a mentor can also be a participant, we adjusted the role checking logic to account for all use cases.&lt;br /&gt;
[[File:add_member_snippet_code.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/ExtremeMachine12/expertiza/pull/21&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158400</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158400"/>
		<updated>2024-10-30T03:08:29Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Email Notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# Changed mailer function for team addition confirmation&lt;br /&gt;
# Add HTML partials for dual role&lt;br /&gt;
# Correct mailer function calls when users/mentors are added&lt;br /&gt;
# Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
Here is the previous PR created of the add_member function. The goal of this was to send a notification when members were added.&lt;br /&gt;
[[File:Add member email.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Based on the professor's feedback that a mentor can also be a participant, we adjusted the role checking logic to account for all use cases.&lt;br /&gt;
[[File:add_member_snippet_code.png|900px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/ExtremeMachine12/expertiza/pull/21&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Add_member_snippet_code.png&amp;diff=158398</id>
		<title>File:Add member snippet code.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Add_member_snippet_code.png&amp;diff=158398"/>
		<updated>2024-10-30T03:08:04Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158377</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158377"/>
		<updated>2024-10-30T03:01:12Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Email Notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# Changed mailer function for team addition confirmation&lt;br /&gt;
# Add HTML partials for dual role&lt;br /&gt;
# Correct mailer function calls when users/mentors are added&lt;br /&gt;
# Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
[[File:Add member email.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/ExtremeMachine12/expertiza/pull/21&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158367</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158367"/>
		<updated>2024-10-30T02:57:06Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Email Notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# Changed mailer function for team addition confirmation&lt;br /&gt;
# Add HTML partials for dual role&lt;br /&gt;
# Correct mailer function calls when users/mentors are added&lt;br /&gt;
# Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
[[File:add_member_code.png|900px|left|alt=Description of image]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/ExtremeMachine12/expertiza/pull/21&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158366</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158366"/>
		<updated>2024-10-30T02:56:44Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Email Notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# Changed mailer function for team addition confirmation&lt;br /&gt;
# Add HTML partials for dual role&lt;br /&gt;
# Correct mailer function calls when users/mentors are added&lt;br /&gt;
# Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
[[File:add_member_code.png|900px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/ExtremeMachine12/expertiza/pull/21&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158365</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158365"/>
		<updated>2024-10-30T02:55:21Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Email Notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# Changed mailer function for team addition confirmation&lt;br /&gt;
# Add HTML partials for dual role&lt;br /&gt;
# Correct mailer function calls when users/mentors are added&lt;br /&gt;
# Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
[[File:add_member_code.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/ExtremeMachine12/expertiza/pull/21&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Add_member_code.png&amp;diff=158361</id>
		<title>File:Add member code.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Add_member_code.png&amp;diff=158361"/>
		<updated>2024-10-30T02:54:35Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158341</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158341"/>
		<updated>2024-10-30T02:50:45Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Email Notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# Changed mailer function for team addition confirmation&lt;br /&gt;
# Add HTML partials for dual role&lt;br /&gt;
# Correct mailer function calls when users/mentors are added&lt;br /&gt;
# Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158339</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158339"/>
		<updated>2024-10-30T02:50:23Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Email Notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
# Changed mailer function for team addition confirmation&lt;br /&gt;
# Add HTML partials for dual role&lt;br /&gt;
# Corrected mailer function calls when users/mentors were added&lt;br /&gt;
# Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158336</id>
		<title>CSC/ECE 517 Fall 2024 - E2460 Mentor-Meeting Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2024_-_E2460_Mentor-Meeting_Management&amp;diff=158336"/>
		<updated>2024-10-30T02:50:03Z</updated>

		<summary type="html">&lt;p&gt;Sgetahu: /* Email Notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Background== &lt;br /&gt;
Expertiza is an open-source course management web application, that is maintained by students and teaching staff across NC State and other universities. Specifically, Expertiza is used as a platform to help students learn how to work collaboratively on large Object Oriented Programming Assignments. If you would like to learn more about Expertiza, please check the Expertiza wiki[1], or the GitHub page [2]. For our project in particular, we were tasked with improving the mentor management system within Expertiza.&lt;br /&gt;
&lt;br /&gt;
== What is a Mentor? ==&lt;br /&gt;
On Expertiza some users are known as mentors. These mentors can both be added to teams manually and automatically assigned if the assignment moderator chooses to select an option where mentors are automatically assigned to teams above 50% capacity. In practice, this means that if you have a max team size of 3, and 2 teammates have been added to team X then team X will automatically be given a mentor.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The problem we have been faced with is multifaceted. First, we found that when teams are automatically built, students are not getting notified of when they are added to a team. Even more alarming is that when mentors are being added to teams, they aren't getting any type of specialized notification letting them know. Mentors should know when they are mentoring a new team, and students should know when they've been added to a team. Team listing should be improved to be sortable by team name, mentor name, or meeting date. &lt;br /&gt;
&lt;br /&gt;
Expertiza doesn’t know when mentors met with teams, so there would have to be text fields where this information could be entered.&lt;br /&gt;
&lt;br /&gt;
The page would have to be accessible to all mentors and course instructors, but a mentor could only enter meetings for the teams they mentored (except that the instructor could edit any of the meeting dates for any mentor).&lt;br /&gt;
&lt;br /&gt;
Our project sought to fix these issues.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
1. Changed mailer function for team addition confirmation&lt;br /&gt;
2. Add HTML partials for dual role&lt;br /&gt;
3. Corrected mailer function calls when users/mentors were added&lt;br /&gt;
4. Add tests&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
# Create a view showing teams, members, and mentors, with meeting date fields.&lt;br /&gt;
# Add input fields for each team where mentors and instructors can enter new, view, edit dates when mentor meetings were conducted.&lt;br /&gt;
# Instructors can edit all dates for mentor meetings regardless of the team.&lt;br /&gt;
# Mentors can also edit dates but only for the team they are mentoring.&lt;br /&gt;
# Add more than three dates for the mentor meetings easily by pressing the + icon at the end of the view.&lt;br /&gt;
# The meeting dates should not be editable for teams having capacity less than 50%.&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
# Implement a new controller to handle CRUD operations for mentor meetings&lt;br /&gt;
# Update models to manage mentor meetings and trigger notifications.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Email Notifications ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mentor Meeting Management ===&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Views ====&lt;br /&gt;
=====_team.html.erb=====&lt;br /&gt;
We reinstituted some of what the previous group did from their pull request to render a new view, refactoring to improve clarity.&lt;br /&gt;
&lt;br /&gt;
[[File:Previous group - refactored.png|1000px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We then added on top of it the conditionals requested of us by our scope. The view code below accomplishes most of the prompt's points.&lt;br /&gt;
*Establishes mentor and instructor functionality to add/edit meeting dates for their teams/all teams accordingly&lt;br /&gt;
*Disables the date field for under capacity teams&lt;br /&gt;
*Includes a button to add and remove meeting dates&lt;br /&gt;
*includes join functionality for under capacity teams&lt;br /&gt;
&lt;br /&gt;
[[File:Capacity and +.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This final bit of code in the _team viewfinishes up coverage for dynamically adding meeting dates with the &amp;quot;+&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
[[File:meeting date functionality.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Controllers ====&lt;br /&gt;
&lt;br /&gt;
===== mentor_meeting_controller.rb =====&lt;br /&gt;
Made modifications to add the private parameters to be passed through the model.&lt;br /&gt;
&lt;br /&gt;
[[File:meeting parameters.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Code Changes in Test ====&lt;br /&gt;
===== mentor_management_spec.rb =====&lt;br /&gt;
The previous groups covered much of the testing pretty thoroughly aside from confirming that a mentor is not auto assigned when auto_assign_mentor is false. This is just a tag along to the existing codebase.&lt;br /&gt;
&lt;br /&gt;
[[File:test_auto_assign_mentor.png|750px|left|alt=Description of image]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Backend Controller Updates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code changes in the controller&lt;br /&gt;
We added a new controller(mentor_meeting.rb) to perform the CRUD operations on the mentor meeting table.&lt;br /&gt;
Implemented the necessary actions (get_dates, add_date, edit_date, delete_date) in the MentorMeetingController.&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot_2024-10-29_175157.jpg]]&lt;br /&gt;
&lt;br /&gt;
Created a new file, mentor_meeting_notifications.rb&lt;br /&gt;
Added the subscription code in that initializer file.&lt;br /&gt;
This file allows subscription to the notifications, which will allow handling of any follow-up actions (logging and emails) when meetings are created, updated, or deleted.&lt;br /&gt;
&lt;br /&gt;
Controller Tests&lt;br /&gt;
Created a new file, mentor_meeting_controller_spec.rb,  in the spec/controllers directory to test the MentorMeetingController&lt;br /&gt;
&lt;br /&gt;
[[File:tests in new file mentor_meeting_controller_spec.jpg]]&lt;br /&gt;
&lt;br /&gt;
Model (Validation Updates)&lt;br /&gt;
The MentorMeeting model was updated with basic validations to ensure that required fields (team_id and meeting_date) are present. Validations for team_id and meeting_date ensure data integrity when saving a meeting.&lt;br /&gt;
&lt;br /&gt;
Triggering Notifications&lt;br /&gt;
Updated the add_date method to trigger a notification after successfully creating a meeting.&lt;br /&gt;
Notifications triggered via ActiveSupport::Notifications.&lt;br /&gt;
&lt;br /&gt;
Helper code&lt;br /&gt;
We also wrote a helper code to map all the team IDs in the mentor meeting table to the appropriate meeting dates.&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
*Github Repository: https://github.com/ExtremeMachine12/expertiza&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2769&lt;br /&gt;
*Pull Request: https://github.com/expertiza/expertiza/pull/2772&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
===Mentor===&lt;br /&gt;
* Nainisha Bhallamudi&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
* Anusha Akkireddy (aakkire)&lt;br /&gt;
* Simon Getahun (sgetahu)&lt;br /&gt;
* Gavin Teague (gwteague)&lt;/div&gt;</summary>
		<author><name>Sgetahu</name></author>
	</entry>
</feed>