<?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=Amantra</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=Amantra"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Amantra"/>
	<updated>2026-08-08T22:39:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_E2404_Refactor_student_teams_functionality&amp;diff=154754</id>
		<title>CSC/ECE 517 Spring 2024 - E2404 Refactor student teams functionality</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2024_-_E2404_Refactor_student_teams_functionality&amp;diff=154754"/>
		<updated>2024-03-28T21:32:36Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Login Credentials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides details about Expertiza Issue E2404. &amp;quot;Refactor student_teams functionality&amp;quot; which is an OSS project in CSC517 Spring 2024.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.&lt;br /&gt;
Users &amp;amp; Participants: Everyone who took the OODD class is a user in expertiza, and instructors can add users as participants in an assignment so that they can access it.&lt;br /&gt;
Almost everything within Assignments is done by participants, not users. That is, everything except teams_users. In the documentation, it can be noted that the team_users table references users instead of participants.&lt;br /&gt;
This anomaly causes problems with how student teams are rendered in the UI, and it doesn’t go well with the new functionality that was recently introduced.&lt;br /&gt;
&lt;br /&gt;
== Requirements == &lt;br /&gt;
=== Changing the schema ===&lt;br /&gt;
* Rename the table table teams_users to teams_participants&lt;br /&gt;
* Create a column that would be called “participant_id”, which will be a foreign key that references participants table&lt;br /&gt;
* Create a migration that fetches the assignment_id for each tuple from the teams table.&lt;br /&gt;
* Find out all the places where user_id is being used, refactor those so that participant_id is used.&lt;br /&gt;
&lt;br /&gt;
=== Refactoring the teams rendering (/views/student_teams/view.html.erb) ===&lt;br /&gt;
* The logic in the team's view that iterates and fetches information of all the team members and displays them would be refactored so that it matches our new design. &lt;br /&gt;
* The new changes should not break the view that works for data where things are populated with user_id. Hence best approach is separate the older functionality into a separate partial and code the new functionality into a separate partial.&lt;br /&gt;
* All the teams are being formed with participant_id instead of user_id&lt;br /&gt;
&lt;br /&gt;
=== Other Changes ===&lt;br /&gt;
* Update logic for all the crud functionalities in teams_users controller &lt;br /&gt;
* Rename the teams_users_controller to teams_participants_controller&lt;br /&gt;
* Some code where sql queries are written to fetch data, should be replaced with fetching data from rails ActiveRecord methods.&lt;br /&gt;
* The html.erb files have extensive ruby code written for fetching data from the database. This code should be removed from the view files and placed into helper classes.&lt;br /&gt;
* Extensive test cases should be present for all the code that is written.&lt;br /&gt;
&lt;br /&gt;
== Schema Changes ==&lt;br /&gt;
&lt;br /&gt;
Here's a brief overview of the key changes we implemented: &lt;br /&gt;
* Table Renaming: Our schema initially included a teams_users table, which, upon review, seemed misaligned with our domain model. To better represent the relationship between teams and participants, we decided to rename this table to teams_participants. [https://github.com/abhigna98/expertiza/commit/64bdf4abe9f79803e2ce60980e6d38af177d1303 GitHub Commit]&lt;br /&gt;
* Introduction of participant_id: To establish a more direct linkage between team participations and individual participants, we added a participant_id column to the newly named teams_participants table. This column serves as a foreign key that references the participants table, clearly defining the relationship. [https://github.com/abhigna98/expertiza/commit/a6a05b248ed804710f30d550cc5a6f99acf59d5b GitHub Commit]&lt;br /&gt;
* Populating participant_id column: The centerpiece of our refactor was the migration designed to populate the new participant_id column with accurate data. Leveraging the existing assignment_id from the teams table and user_id from the teams_participants table, our migration carefully matched each team participation to its corresponding participant and updated the participant_id accordingly.[https://github.com/abhigna98/expertiza/commit/e72aa670b5f786cd82d2ba16d8de3c2e55851587 GitHub Commit]&lt;br /&gt;
&lt;br /&gt;
=== ER diagram for updated schema ===&lt;br /&gt;
[[File:ER_Updated.png |900px]]&lt;br /&gt;
&lt;br /&gt;
== Refactoring teams rendering ==&lt;br /&gt;
&lt;br /&gt;
The objective of this refactoring task is to improve the readability, maintainability, and scalability of the code responsible for rendering team information in the view.html.erb file of the student_teams view. This refactoring involves separating existing functionality into specific partials and ensuring compatibility with the new data structure using participant_id instead of user_id. It's crucial to ensure that these changes do not break existing functionality that relies on user_id data. By separating old and new functionalities into distinct partials and conducting a data migration, the codebase will become more organized and adaptable, facilitating future development efforts. [https://github.com/abhigna98/expertiza/commit/146ad3f9c46e047ec209939e6762e579c47134ba GitHub Commit]&lt;br /&gt;
&lt;br /&gt;
=== ''Refactor Implementation'' ===&lt;br /&gt;
&lt;br /&gt;
we have successfully refactored the 'view.html.erb' file in the student_teams view to enhance readability and maintainability. The original code was cluttered, making it challenging to understand and extend. Through modularization, we have simplified the code by introducing partials, resulting in a more organized structure.&lt;br /&gt;
&lt;br /&gt;
The following partials were created as part of the refactoring process:&lt;br /&gt;
&lt;br /&gt;
# '_invited_people.html.erb' : This partial is responsible for displaying invited participants to the assignment team.&lt;br /&gt;
# '_display_advertisements.html.erb' : This partial handles the display of advertisements within the view.&lt;br /&gt;
# '_send_invitations.html.erb': This partial implements the functionality for sending invitations to team members.&lt;br /&gt;
# '_received_invitations.html.erb': This partial is used to display received invitations for the current user.&lt;br /&gt;
These partials contribute to a cleaner and more manageable codebase, improving the overall developer experience and facilitating future updates to the Expertiza application.&lt;br /&gt;
&lt;br /&gt;
== Refactoring CRUD Functionalities in Teams Participants Controller ==&lt;br /&gt;
&lt;br /&gt;
Firstly,we renamed teams_users_controller to teams_participants_controller and also all its reference files like teams_users_helper.rb and teams_users_controller_spec.rb.&lt;br /&gt;
&lt;br /&gt;
In create method,&lt;br /&gt;
#Refactored to fetch the AssignmentParticipant only once instead of twice by removing a redundant find query.&lt;br /&gt;
#Adjusted to check if the user is already part of the team by using assignment.participant_on_team? instead of finding the AssignmentParticipant first and then checking the team.&lt;br /&gt;
#Similarly checked for CourseTeam as well&lt;br /&gt;
#Improved the process of fetching CourseParticipant by consolidating two separate find queries into one and using if course.participant_on_team? for a cleaner check on team membership.&lt;br /&gt;
&lt;br /&gt;
[[File:Create1.PNG|700px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Create2.PNG|700px]]&lt;br /&gt;
&lt;br /&gt;
In delete method,&lt;br /&gt;
#The delete method now uses Participant.find_by instead of User.find to obtain the participant object directly using the participant ID. This reduces the number of database queries.&lt;br /&gt;
#Removed a redundant User.find query since the user can be fetched through the participant object.&lt;br /&gt;
&lt;br /&gt;
[[File:Deletemethod.PNG|700px]]&lt;br /&gt;
&lt;br /&gt;
== Refactoring Signedup Team ==&lt;br /&gt;
&lt;br /&gt;
#In SignedUpTeam, the superclass is corrected from ApplicationRecord to ActiveRecord::Base, ensuring compatibility with the expected Rails inheritance structure.&lt;br /&gt;
#In queries,team_users has been replaced with team_participants in finding team participants and team users.&lt;br /&gt;
&lt;br /&gt;
[[File:Signup4.PNG|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Signup1.PNG|700px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Signup2.PNG|700px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Signup3.PNG|700px]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
Main files which were changed are&lt;br /&gt;
&lt;br /&gt;
Controllers:&lt;br /&gt;
* app/controllers/assessment360_controller.rb&lt;br /&gt;
* app/controllers/grades_controller.rb&lt;br /&gt;
* app/controllers/invitations_controller.rb&lt;br /&gt;
* app/controllers/join_team_requests_controller.rb&lt;br /&gt;
* app/controllers/lottery_controller.rb&lt;br /&gt;
* app/controllers/pair_programming_controller.rb&lt;br /&gt;
* app/controllers/popup_controller.rb&lt;br /&gt;
* app/controllers/review_mapping_controller.rb&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/controllers/teams_participants_controller.rb&lt;br /&gt;
&lt;br /&gt;
Models:&lt;br /&gt;
* app/models/signed_up_team.rb&lt;br /&gt;
* app/models/team.rb&lt;br /&gt;
* app/models/teams_participant.rb&lt;br /&gt;
* app/models/teams_user.rb&lt;br /&gt;
* app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
Helpers:&lt;br /&gt;
* app/helpers/teams_participants_helper.rb&lt;br /&gt;
&lt;br /&gt;
Views:&lt;br /&gt;
* app/views/student_teams/_display_advertisements.html.erb&lt;br /&gt;
* app/views/student_teams/_invited_people.html.erb&lt;br /&gt;
* app/views/student_teams/_received_invitations.html.erb&lt;br /&gt;
* app/views/student_teams/_select_duty_form.html.erb&lt;br /&gt;
* app/views/student_teams/_send_invitations.html.erb&lt;br /&gt;
* app/views/student_teams/_team_display.html.erb&lt;br /&gt;
* app/views/student_teams/edit.html.erb&lt;br /&gt;
* app/views/student_teams/view.html.erb&lt;br /&gt;
&lt;br /&gt;
Config:&lt;br /&gt;
* config/locales/en_US.yml&lt;br /&gt;
&lt;br /&gt;
db:&lt;br /&gt;
* db/migrate/20240324042615_rename_teams_users_to_teams_participants.rb&lt;br /&gt;
* db/migrate/20240324043736_add_participant_id_to_teams_participants.rb&lt;br /&gt;
* db/migrate/20240324044135_populate_participant_id_in_teams_participants.rb&lt;br /&gt;
&lt;br /&gt;
spec:&lt;br /&gt;
* spec/controllers/student_teams_controller_spec.rb&lt;br /&gt;
* spec/controllers/teams_participants_controller_spec.rb&lt;br /&gt;
* spec/controllers/teams_users_controller_spec.rb&lt;br /&gt;
* spec/helpers/grades_helper_spec.rb&lt;br /&gt;
* spec/models/assignment_spec.rb&lt;br /&gt;
* spec/models/assignment_team_spec.rb&lt;br /&gt;
* spec/models/course_spec.rb&lt;br /&gt;
* spec/models/course_team_spec.rb&lt;br /&gt;
* spec/models/course_team_spec.rb&lt;br /&gt;
* spec/models/team_spec.rb&lt;br /&gt;
* spec/models/participant_spec.rb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
After implementing changes in 'teams_users', it's essential to reassess the flows and user stories involving its usage. This entails manually examining various pathways through which a team for an assignment can be created in Expertiza, along with associated operations like removing a user from a team, adding a new user, deleting a team, and so forth. This testing phase is crucial to verify that Expertiza's functionality remains intact and operates as expected post-refactoring.&lt;br /&gt;
&lt;br /&gt;
The primary user stories we examined include:&lt;br /&gt;
''Student Creates a Team:''&lt;br /&gt;
* First, the student navigates to the assignments section in their view.&lt;br /&gt;
* Then, they select a specific assignment and access the &amp;quot;Your Team&amp;quot; page.&lt;br /&gt;
* On this page, they input a team name and confirm by clicking the &amp;quot;Name Team&amp;quot; button.&lt;br /&gt;
[[File: New Team.png|700px]]&lt;br /&gt;
&lt;br /&gt;
''Student Sends Invitations to Other Students:''&lt;br /&gt;
* After successfully creating a team, the student proceeds to send invitations to other students.&lt;br /&gt;
* They input the usernames of the desired recipients and send invitations by clicking on the &amp;quot;Invite&amp;quot; button.&lt;br /&gt;
[[File: Sending Invitaion.png|700px]]&lt;br /&gt;
&lt;br /&gt;
''Student Joins a Team:''&lt;br /&gt;
* In the recipient student's Expertiza view, they will see a notification or invitation indicating that they have been invited to join a team.&lt;br /&gt;
* They navigate to the relevant assignment and locate the invitation.&lt;br /&gt;
* Finally, they accept the invitation to join the team.&lt;br /&gt;
[[File: Receive Invitation.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Automated RSpec Testing ===&lt;br /&gt;
As this is a refactoring project, the testing scope is confined to validating the changes made during the refactoring process. Additionally, it involves ensuring that the existing test cases remain intact and are adjusted accordingly to accommodate any modifications.[https://github.com/abhigna98/expertiza/commit/a03c577e14f020d87cae3a24e0dd7685bee0a719 GitHub Commit]&lt;br /&gt;
&lt;br /&gt;
The `Team` class encapsulates functionalities related to managing teams in the context of assignments or courses. It defines methods for handling team participants, checking for existing teams, generating unique team names, and importing/exporting team data. The provided code includes extensive test cases to ensure the reliability and correctness of these methods. Test blocks such as `describe '#participant'` validate the retrieval of participants for a team, while `describe '.check_for_existing'` verifies the behavior of checking for existing teams within a specific assignment context. Additionally, the class includes methods for importing teams from external sources, handling duplicates, and managing team names. Overall, the `Team` class provides a robust framework for managing teams within the application, with thorough testing to ensure its functionality in various scenarios.&lt;br /&gt;
&lt;br /&gt;
[[File: RSpecTeam spec.jpeg|700px|center]]&lt;br /&gt;
&lt;br /&gt;
The `Assignment` class is thoroughly tested through a series of test cases, validating its functionalities in various scenarios. Tests include checking default values, verifying team assignments, examining topic presence, and ensuring proper course assignment. Methods for managing teams, handling rubrics, and assigning reviewers dynamically are also rigorously tested. Error handling for review configurations and metareviewer assignments is validated, ensuring robustness. Overall, these tests offer comprehensive coverage of the `Assignment` class, guaranteeing its reliability and correctness in different contexts and configurations.&lt;br /&gt;
&lt;br /&gt;
[[File: RSpecAssignment rb.jpeg|700px|center]]&lt;br /&gt;
&lt;br /&gt;
The test suite for the `AssignmentTeam` model in the provided code is extensive, covering a wide range of functionalities and scenarios. It validates key aspects such as hyperlinks submission, participant inclusion, deletion of teams, import/export operations, and more. Each test case meticulously examines different conditions to ensure the model's correctness and robustness. From verifying the presence of hyperlinks to assigning reviewers and checking submissions, the tests provide comprehensive coverage. Additionally, the test suite demonstrates adherence to best practices in software testing, including clear setup, execution, and verification steps. Overall, these tests play a crucial role in maintaining the reliability and stability of the `AssignmentTeam` model within the Expertiza application.&lt;br /&gt;
&lt;br /&gt;
[[File:RSpecAssignmentTeam.jpeg|700px|center]]&lt;br /&gt;
&lt;br /&gt;
The verification process extended to testing scenarios such as adding a new team member when the team was already full, removing and subsequently re-adding the same user, and sending invitations to users already part of the team. This ensured that the team management feature in Expertiza functioned reliably and consistently across diverse user interactions and situations.&lt;br /&gt;
&lt;br /&gt;
== Bonus Task ==&lt;br /&gt;
==== ''Issue:'' ==== &lt;br /&gt;
The Team information page allows the same user to be added multiple times, likely due to instructors adding a member already invited by a student.&lt;br /&gt;
&lt;br /&gt;
==== ''Recreation of the issue:'' ==== &lt;br /&gt;
&lt;br /&gt;
* Instructor adds a member already invited by a student.&lt;br /&gt;
* Student invites a member who is subsequently added by the instructor.&lt;br /&gt;
&lt;br /&gt;
==== ''Primary methods to create a team within the Expertiza platform'' ====&lt;br /&gt;
&lt;br /&gt;
BY INSTRUCTOR:&lt;br /&gt;
*Instructors have the authority to create teams through the &amp;quot;Manage&amp;quot; tab. &lt;br /&gt;
*They can access this option by navigating to the specific course and clicking on the &amp;quot;Add Teams&amp;quot; feature. &lt;br /&gt;
*This allows instructors to directly form teams and assign students to them.&lt;br /&gt;
&lt;br /&gt;
BY STUDENT:&lt;br /&gt;
*Students can initiate the team creation process through the &amp;quot;Assignments&amp;quot; tab. &lt;br /&gt;
*Within this section, students can select any assignment and proceed to the &amp;quot;Your Team&amp;quot; subsection. &lt;br /&gt;
*Here, they have the option to create a new team, providing a team name and possibly inviting other students to join.&lt;br /&gt;
&lt;br /&gt;
==== ''Resolution'' ====&lt;br /&gt;
* Identification of Issue Source:&lt;br /&gt;
First, we need to identify the root cause of the problem. This may involve tracing the code paths where team creation occurs and pinpointing where duplicate entries are being allowed.&lt;br /&gt;
&lt;br /&gt;
* Validation Checks:&lt;br /&gt;
Implement validation checks to prevent the addition of duplicate users to a team. This can be done by:&lt;br /&gt;
Checking if the user is already a member of the team before adding them again.&lt;br /&gt;
Verifying if the user has already received an invitation to join the team before sending another invitation.&lt;br /&gt;
Ensuring that each user can only be added to the team once.&lt;br /&gt;
&lt;br /&gt;
* Error Handling:&lt;br /&gt;
Provide appropriate error messages or notifications to users when they attempt to add a user who is already part of the team. This will inform them of the issue and prevent accidental duplication.&lt;br /&gt;
&lt;br /&gt;
* Refinement of Team Creation Workflow:&lt;br /&gt;
Review the team creation workflow to streamline the process and minimize the likelihood of duplicate entries. This may involve simplifying the interface, providing clearer instructions, or implementing additional safeguards.&lt;br /&gt;
&lt;br /&gt;
* Testing and Validation:&lt;br /&gt;
Thoroughly test the updated team creation functionality to ensure that duplicate entries are properly prevented. Test various scenarios, including adding existing team members, inviting users who have already been invited, and attempting to add users who are already part of the team.&lt;br /&gt;
&lt;br /&gt;
While some solutions, such as displaying a message when a user is already a team member, have already been implemented, there are still further changes required to fully address the issue.&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
# Meghana Chowdary Ainampudi (mainamp@ncsu.edu)&lt;br /&gt;
# Sai Abhigna Tummala (stummal5@ncsu.edu)&lt;br /&gt;
# Parshav Gandhi (pjgandh3@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Mentor: Ananya Mantravadi&lt;br /&gt;
&lt;br /&gt;
== Code Details == &lt;br /&gt;
Github Pull Request - https://github.com/expertiza/expertiza/pull/2770&lt;br /&gt;
&lt;br /&gt;
Repo - https://github.com/abhigna98/expertiza&lt;br /&gt;
&lt;br /&gt;
Demo Link - https://youtu.be/7FQTt501bBg&lt;br /&gt;
&lt;br /&gt;
Deployment Link - http://152.7.178.105:8080&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=152930</id>
		<title>CSC/ECE 517 Fall 2007/wiki2 4 2q</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=152930"/>
		<updated>2024-01-12T01:48:15Z</updated>

		<summary type="html">&lt;p&gt;Amantra: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''A Guide to Use Cases on the WEB'''&lt;br /&gt;
&lt;br /&gt;
''Topic: Use cases. There are even more pages on the Web on use cases than on [https://www.codecademy.com/articles/mvc MVC]. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.'' &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also, a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.&lt;br /&gt;
 &lt;br /&gt;
=What is a Use Case?=&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;'''''Use case''' is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction, and the system itself, represented as a sequence of simple steps.''&amp;quot;[1][2]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Simply put, a use case is a description of how a person will interact with the system to achieve a certain goal. It helps to learn if any errors could occur in the process and design features to resolve those errors. &lt;br /&gt;
&lt;br /&gt;
It consists of 3 primary elements:&lt;br /&gt;
* Actor: They are generally the user of the system or an external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal. &lt;br /&gt;
* System: It describes the process/steps to reach the final outcome.&lt;br /&gt;
* Goal: A goal is an end result that follows the sequence of events as described in the use cases. &lt;br /&gt;
&lt;br /&gt;
Every use case gives a complete list of events that occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as the existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are a few links to external websites which further illustrate this concept.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ibm.com/developerworks/library/ws-using-oo/ OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://www.cs.uno.edu/~jaime/Courses/4210/useCaseFundamentals.html Use Case Fundamentals]&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams and Use Case Diagrams==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called &amp;quot;use cases.&amp;quot; The Use case diagram shows which actors interact with each use case.&amp;quot;''[3]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
UML is a collection of diagrams that visually represents a software or a system. A use case diagram is one of its types. They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system. They also evolve as the projects or systems change with time. The standard elements of a use case diagram make comprehension easy for anyone trying to understand the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are useful links in understanding how to draw typical use case diagrams.&lt;br /&gt;
&lt;br /&gt;
* [https://www.smartdraw.com/uml-diagram/ An introduction to UML diagrams &amp;amp; Tutorial] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
* [https://www.andrew.cmu.edu/course/90-754/umlucdfaq.html Tips and FAQ]&lt;br /&gt;
&lt;br /&gt;
=How to Write a Use Case?=&lt;br /&gt;
&lt;br /&gt;
==Writing Effective Use Cases==&lt;br /&gt;
&lt;br /&gt;
One of the most difficult problems in software development is capturing precisely what you want to build. Inaccurate requirements will result in significant delay, rework, or even abandonment of the project. Effective applying the use case technique helps your team capture requirements from the user's point of view which can be easily understood by both the end-user and your team. Use case-driven development to support subsequent development activities such as analysis, design, and testing.&lt;br /&gt;
&lt;br /&gt;
Listed below are useful links in understanding how to write effective use cases.&lt;br /&gt;
* [https://www.usability.gov/how-to-and-tools/methods/use-cases.html How to write a use case (1)]&lt;br /&gt;
* [https://www.wikihow.com/Write-a-Use-Case How to write a use case (2)]&lt;br /&gt;
* [http://www.utm.mx/~caff/doc/OpenUPWeb/openup/guidances/guidelines/detail_ucs_and_scenarios_6BC56BB7.html Efficient way to write use cases]&lt;br /&gt;
* [https://www.visual-paradigm.com/tutorials/writingeffectiveusecase.jsp Drawing use cases using a tool]&lt;br /&gt;
&lt;br /&gt;
=Examples using Use Cases=&lt;br /&gt;
In this section, a few instructive examples have been outlined along with their references which illustrate different ways in which use cases can be written. The first example is a basic use-case template.&lt;br /&gt;
&lt;br /&gt;
===Basic use case template===&lt;br /&gt;
Described below are some of the characteristics of a typical use case.&lt;br /&gt;
  '''CHARACTERISTIC INFORMATION'''&lt;br /&gt;
  * ''Goal in Context'':   Buyer issues request directly to our company, expects goods shipped and to be billed.&lt;br /&gt;
  * ''Scope'':  Company&lt;br /&gt;
  * ''Preconditions'':  We know the Buyer, their address, etc.&lt;br /&gt;
  * ''Success End Condition'':  Buyer has goods, we have money for the goods.&lt;br /&gt;
  * ''Failed End Condition'':  We have not sent the goods, Buyer has not spent the money.&lt;br /&gt;
  * ''Primary Actor'':  Buyer, any agent (or computer) acting for the customer&lt;br /&gt;
  * ''Trigger'':  purchase request comes in.&lt;br /&gt;
  &lt;br /&gt;
  '''MAIN SUCCESS SCENARIO'''&lt;br /&gt;
  1. Buyer calls in with a purchase request.&lt;br /&gt;
  2. The company captures the buyer’s name, address, requested goods, etc.&lt;br /&gt;
  3. The company gives buyers information on goods, prices, delivery dates, etc.&lt;br /&gt;
  4. Buyer signs for order.&lt;br /&gt;
  5. The company creates orders, and ships orders to buyers.&lt;br /&gt;
  6. The company ships invoices to the buyer.&lt;br /&gt;
  7. Buyers pay invoices.&lt;br /&gt;
  &lt;br /&gt;
  '''EXTENSIONS'''&lt;br /&gt;
  3a. The company is out of one of the ordered items: &lt;br /&gt;
      3a1. Renegotiate order.&lt;br /&gt;
  4a. Buyer pays directly with a credit card:&lt;br /&gt;
      4a1. Take payment by credit card (use case 44)&lt;br /&gt;
  7a. Buyer returns goods:&lt;br /&gt;
      7a. Handle returned goods (use case 105)&lt;br /&gt;
The basic steps that can be followed to ensure writing an effective use case have been described well in [https://www.wikihow.com/Write-a-Use-Case How to Write a use case].[4]&lt;br /&gt;
&lt;br /&gt;
===Restaurant===&lt;br /&gt;
This example provides one use case but distinctly provides a step-by-step analysis of the events that constitute a use case. It mentions the actors, pre-conditions, exceptions, and alternative scenarios.&lt;br /&gt;
&lt;br /&gt;
* [http://www.uml-diagrams.org/restaurant-uml-use-case-diagram-example.html Restaurant]&lt;br /&gt;
&lt;br /&gt;
===Purchase order===&lt;br /&gt;
This example provides a typical use case specification by listing the activity, result, constraints, and extensions involved with a purchase order from a Finance web page.&lt;br /&gt;
&lt;br /&gt;
* [https://creately.com/diagram/example/ifq4uulr/Purchase%20Order Purchase order System]&lt;br /&gt;
&lt;br /&gt;
===ATM system===&lt;br /&gt;
This example is a little more involved in that it provides several use cases associated with using an ATM system including cash withdrawal,&lt;br /&gt;
transfers, deposits, balance inquiries, etc.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.cs.fsu.edu/~baker/swe1/restricted/templates/rr631gv1_stuwrk_withdraw_cash_use-case_spec.pdf ATM System]&lt;br /&gt;
&lt;br /&gt;
===A shopping website order Process===&lt;br /&gt;
This is a very good example that describes the scenarios and extensions involved in writing a use case for an online shopping order. It also describes the UML diagram.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.uml-diagrams.org/examples/online-shopping-use-case-diagram-example.html?context=uc-examples Shopping website order]&lt;br /&gt;
&lt;br /&gt;
===Self Service Machine===&lt;br /&gt;
This example provides typical use cases of a self-service machine like supermarket barcode scanners, online banking services, check-in kiosks, and so on. Some of the aspects of using a self-service machine are: buying a product, re-stocking the machine, collecting the money, etc. The following link provides a UML diagram that depicts the interaction between the users and the system through the use case of self-service kiosks.&lt;br /&gt;
  &lt;br /&gt;
* [https://creately.com/diagram/example/hy8pucc5/Self-Service%20Kiosk Self-Service Machine]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* [1] Ivar Jacobson (1992). Object-Oriented Software Engineering. Addison Wesley Professional. ISBN 0-201-54435.&lt;br /&gt;
* [2] [http://en.wikipedia.org/wiki/Use_case Wikipedia Page] Basic definition of Use Case&lt;br /&gt;
* [3] [http://www.developer.com/design/article.php/2109801 Use Case Diagrams]&lt;br /&gt;
* [4] [https://www.wikihow.com/Write-a-Use-Case How to Write a use case]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
* [http://www.cs.uno.edu/~jaime/Courses/4210/useCaseFundamentals.html Use Case Fundamentals]&lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
* [http://www.cs.rug.nl/search/uploads/Teaching/RE2009Fall/paper/1999_Lilly_TOOLS_Use%20Case%20Pitfalls%20Top%2010%20Problems%20from%20Real%20Projects%20Using%20Use%20Cases.pdf Use Case Pitfalls]&lt;br /&gt;
* [https://www.visual-paradigm.com/tutorials/writingeffectiveusecase.jsp Writing effective Use Cases]&lt;br /&gt;
* [https://www.wikihow.com/Write-a-Use-Case How to Write a use case]&lt;br /&gt;
* [http://www.utm.mx/~caff/doc/OpenUPWeb/openup/guidances/guidelines/detail_ucs_and_scenarios_6BC56BB7.html Writing Use Case]&lt;br /&gt;
* [https://www.andrew.cmu.edu/course/90-754/umlucdfaq.html Tips and FAQ]&lt;br /&gt;
* [https://www.codecademy.com/articles/mvc MVC]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151945</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151945"/>
		<updated>2023-12-01T17:29:51Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /*  Flowchart  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
==== Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-10395a909ed1f2034b4a4c8f57c0e30382d9492e0b16bb6fe6fb91a424f6f034 _review_report.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-7e27a69ffb5fc12f35e704744acac1f25674cc303b2df0aa31e616597d1038dc list_submission.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-01b69231711e558d3d45d41b06f8b7f1603915a184943d1b96883d3de097673c all_students_all_reviews.html.erb])====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-81682970df434d0a417dee04daefe56b9eb154c75b832b3ba4bbc49ddd571e6a course_student_grade_summary.html.erb])====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===  Lo-fi UI Example  ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== Flowchart ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Automated Testing === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151944</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151944"/>
		<updated>2023-12-01T17:29:38Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /*  Lo-fi UI Example  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
==== Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-10395a909ed1f2034b4a4c8f57c0e30382d9492e0b16bb6fe6fb91a424f6f034 _review_report.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-7e27a69ffb5fc12f35e704744acac1f25674cc303b2df0aa31e616597d1038dc list_submission.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-01b69231711e558d3d45d41b06f8b7f1603915a184943d1b96883d3de097673c all_students_all_reviews.html.erb])====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-81682970df434d0a417dee04daefe56b9eb154c75b832b3ba4bbc49ddd571e6a course_student_grade_summary.html.erb])====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===  Lo-fi UI Example  ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Automated Testing === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151943</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151943"/>
		<updated>2023-12-01T17:28:35Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Demo Video reflecting changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
==== Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-10395a909ed1f2034b4a4c8f57c0e30382d9492e0b16bb6fe6fb91a424f6f034 _review_report.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-7e27a69ffb5fc12f35e704744acac1f25674cc303b2df0aa31e616597d1038dc list_submission.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-01b69231711e558d3d45d41b06f8b7f1603915a184943d1b96883d3de097673c all_students_all_reviews.html.erb])====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-81682970df434d0a417dee04daefe56b9eb154c75b832b3ba4bbc49ddd571e6a course_student_grade_summary.html.erb])====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Automated Testing === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151942</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151942"/>
		<updated>2023-12-01T17:28:13Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Rspec Unit Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
==== Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-10395a909ed1f2034b4a4c8f57c0e30382d9492e0b16bb6fe6fb91a424f6f034 _review_report.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-7e27a69ffb5fc12f35e704744acac1f25674cc303b2df0aa31e616597d1038dc list_submission.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-01b69231711e558d3d45d41b06f8b7f1603915a184943d1b96883d3de097673c all_students_all_reviews.html.erb])====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-81682970df434d0a417dee04daefe56b9eb154c75b832b3ba4bbc49ddd571e6a course_student_grade_summary.html.erb])====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Automated Testing === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151941</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151941"/>
		<updated>2023-12-01T17:23:57Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
==== Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-10395a909ed1f2034b4a4c8f57c0e30382d9492e0b16bb6fe6fb91a424f6f034 _review_report.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-7e27a69ffb5fc12f35e704744acac1f25674cc303b2df0aa31e616597d1038dc list_submission.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-01b69231711e558d3d45d41b06f8b7f1603915a184943d1b96883d3de097673c all_students_all_reviews.html.erb])====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-81682970df434d0a417dee04daefe56b9eb154c75b832b3ba4bbc49ddd571e6a course_student_grade_summary.html.erb])====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151940</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151940"/>
		<updated>2023-12-01T17:23:12Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
==== Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-10395a909ed1f2034b4a4c8f57c0e30382d9492e0b16bb6fe6fb91a424f6f034 _review_report.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-7e27a69ffb5fc12f35e704744acac1f25674cc303b2df0aa31e616597d1038dc list_submission.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-01b69231711e558d3d45d41b06f8b7f1603915a184943d1b96883d3de097673c all_students_all_reviews.html.erb])====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151939</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151939"/>
		<updated>2023-12-01T17:20:04Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
==== Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-10395a909ed1f2034b4a4c8f57c0e30382d9492e0b16bb6fe6fb91a424f6f034 _review_report.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-7e27a69ffb5fc12f35e704744acac1f25674cc303b2df0aa31e616597d1038dc list_submission.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151938</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151938"/>
		<updated>2023-12-01T17:18:30Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
==== Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-10395a909ed1f2034b4a4c8f57c0e30382d9492e0b16bb6fe6fb91a424f6f034 _review_report.html.erb]) ====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151937</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151937"/>
		<updated>2023-12-01T17:14:52Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151936</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151936"/>
		<updated>2023-12-01T17:13:34Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Assignment Search UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151934</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151934"/>
		<updated>2023-12-01T17:13:03Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Course Search UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151932</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151932"/>
		<updated>2023-12-01T17:12:38Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* User Search UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151931</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151931"/>
		<updated>2023-12-01T17:11:23Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* User Search UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151930</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151930"/>
		<updated>2023-12-01T17:10:23Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx]) ====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151929</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151929"/>
		<updated>2023-12-01T17:09:21Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f tree_display.jsx])====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151928</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151928"/>
		<updated>2023-12-01T17:08:04Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Issue With Previous Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issues With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151927</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151927"/>
		<updated>2023-12-01T17:07:47Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* E2153 Previous Implementations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151926</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151926"/>
		<updated>2023-12-01T17:06:56Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Search for User:) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151925</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151925"/>
		<updated>2023-12-01T17:06:40Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Search for User: (code) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:)===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151924</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151924"/>
		<updated>2023-12-01T17:03:49Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Implementation (code) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User: ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f code])===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 list.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-d954fa1ef4604a6f26c8298dc906e58f72c703a73ecdf6b3d23f62dfab05c956 _search.html.erb], [https://github.com/expertiza/expertiza/pull/2706/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6e users_controller.rb])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151919</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151919"/>
		<updated>2023-12-01T16:55:27Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Search for User: (code) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User: ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f code])===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 code])====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change &amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151918</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151918"/>
		<updated>2023-12-01T16:54:09Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Search for User: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User: ([https://github.com/expertiza/expertiza/pull/2706/files#diff-ab29537d7f05e403db23d4970822a38391693e8b34dcb1c3849e32b8dd84853f code])===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change ([https://github.com/expertiza/expertiza/pull/2706/files#diff-4e77bbdf22e7d65887a01a2097d3c065308bb4ed40a71fecb6141f3016783206 code])&amp;lt;/li&amp;gt; &lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151908</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151908"/>
		<updated>2023-12-01T16:38:36Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Team (Member) Search UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Tm.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Tm.jpeg&amp;diff=151907</id>
		<title>File:Tm.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Tm.jpeg&amp;diff=151907"/>
		<updated>2023-12-01T16:38:09Z</updated>

		<summary type="html">&lt;p&gt;Amantra: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151904</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151904"/>
		<updated>2023-12-01T16:33:42Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /*  Flowchart  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151903</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151903"/>
		<updated>2023-12-01T16:33:33Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /*  Lo-fi UI Example  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151901</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151901"/>
		<updated>2023-12-01T16:33:10Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Code Snippets Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|700px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151900</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151900"/>
		<updated>2023-12-01T16:32:35Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Student Grades Search UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.jpeg|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|800px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|800px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Gs2.jpeg&amp;diff=151899</id>
		<title>File:Gs2.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Gs2.jpeg&amp;diff=151899"/>
		<updated>2023-12-01T16:31:54Z</updated>

		<summary type="html">&lt;p&gt;Amantra: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151895</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151895"/>
		<updated>2023-12-01T16:26:28Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Code Snippet Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippets Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|800px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|800px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151894</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151894"/>
		<updated>2023-12-01T16:25:59Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Code Snippet Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is more specific with respect to each test.&lt;br /&gt;
# We added more tests motivated by the test skeleton provided to us. &lt;br /&gt;
# We are added tests to test views where we added JavaScript code, which are available in the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (view last commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Review report spec.jpeg|800px]]&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/58d7ec58e3f7402139e92ee6e91d1f3acba18f2f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:List submissions spec.jpeg|800px]] &lt;br /&gt;
&lt;br /&gt;
'''4. features/search_spec.rb''' [https://github.com/expertiza/expertiza/pull/2706/commits/3c5a56159337a43b33a2448dcea77e0c534b1a5f (view commit)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Search spec.jpeg|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:List_submissions_spec.jpeg&amp;diff=151882</id>
		<title>File:List submissions spec.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:List_submissions_spec.jpeg&amp;diff=151882"/>
		<updated>2023-12-01T16:05:38Z</updated>

		<summary type="html">&lt;p&gt;Amantra: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_report_spec.jpeg&amp;diff=151881</id>
		<title>File:Review report spec.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_report_spec.jpeg&amp;diff=151881"/>
		<updated>2023-12-01T16:02:38Z</updated>

		<summary type="html">&lt;p&gt;Amantra: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Search_spec.jpeg&amp;diff=151877</id>
		<title>File:Search spec.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Search_spec.jpeg&amp;diff=151877"/>
		<updated>2023-12-01T15:57:52Z</updated>

		<summary type="html">&lt;p&gt;Amantra: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151845</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151845"/>
		<updated>2023-11-30T22:31:47Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Code Snippet Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is going to be more specific with respect to each test.&lt;br /&gt;
# We will try to add more tests if possible to increase the code coverage of the controllers and models.&lt;br /&gt;
# We are also adding tests to to test views where we added JavaScript code, which is available in the file &amp;quot;search_spec.rb&amp;quot; the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. models/user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (last commit link)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
'''2. features/review_report_view_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
'''3. features/list_submissions_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
'''4. spec/features/search_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151844</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151844"/>
		<updated>2023-11-30T22:26:33Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Code Snippet Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is going to be more specific with respect to each test.&lt;br /&gt;
# We will try to add more tests if possible to increase the code coverage of the controllers and models.&lt;br /&gt;
# We are also adding tests to to test views where we added JavaScript code, which is available in the file &amp;quot;search_spec.rb&amp;quot; the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. user_spec.rb:''' [https://github.com/expertiza/expertiza/pull/2706/commits/a77afc80378289baad0ef6b53df13c3728216b82 (last commit link)]&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151843</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151843"/>
		<updated>2023-11-30T22:21:51Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We wrote our test cases as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is going to be more specific with respect to each test.&lt;br /&gt;
# We will try to add more tests if possible to increase the code coverage of the controllers and models.&lt;br /&gt;
# We are also adding tests to to test views where we added JavaScript code, which is available in the file &amp;quot;search_spec.rb&amp;quot; the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. user_spec.rb:'''  &lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151836</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151836"/>
		<updated>2023-11-28T22:40:52Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Rspec Unit Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We plan to extend this as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is going to be more specific with respect to each test.&lt;br /&gt;
# We will try to add more tests if possible to increase the code coverage of the controllers and models.&lt;br /&gt;
# We are also adding tests to to test views where we added JavaScript code, which is available in the file &amp;quot;search_spec.rb&amp;quot; the features folder inside spec folder.&lt;br /&gt;
&lt;br /&gt;
'''1. user_spec.rb:'''  &lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151835</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151835"/>
		<updated>2023-11-28T22:32:50Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Code Snippet Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We plan to extend this as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is going to be more specific with respect to each test.&lt;br /&gt;
# We will try to add more tests if possible to increase the code coverage of the controllers and models.&lt;br /&gt;
&lt;br /&gt;
'''1. user_spec.rb:'''  &lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151834</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151834"/>
		<updated>2023-11-28T22:01:39Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Code Snippet Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We plan to extend this as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is going to be more specific with respect to each test.&lt;br /&gt;
# We will be introducing fixtures in the tests to modularize the common code in each test.&lt;br /&gt;
# We will try to add more tests if possible to increase the code coverage of the controllers and models.&lt;br /&gt;
&lt;br /&gt;
'''1. user_spec.rb:'''  &lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151833</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151833"/>
		<updated>2023-11-28T22:01:06Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We plan to extend this as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is going to be more specific with respect to each test.&lt;br /&gt;
# We will be introducing fixtures in the tests to modularize the common code in each test.&lt;br /&gt;
# We will try to add more tests if possible to increase the code coverage of the controllers and models.&lt;br /&gt;
&lt;br /&gt;
1. user_spec.rb:&lt;br /&gt;
  &lt;br /&gt;
[[File:Userspec1.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Userspec1.png&amp;diff=151832</id>
		<title>File:Userspec1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Userspec1.png&amp;diff=151832"/>
		<updated>2023-11-28T21:57:51Z</updated>

		<summary type="html">&lt;p&gt;Amantra: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151831</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151831"/>
		<updated>2023-11-28T21:42:51Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Demo Video reflecting changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We plan to extend this as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is going to be more specific with respect to each test.&lt;br /&gt;
# We will be introducing fixtures in the tests to modularize the common code in each test.&lt;br /&gt;
# We will try to add more tests if possible to increase the code coverage of the controllers and models.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo video] for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151830</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151830"/>
		<updated>2023-11-28T21:42:21Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Resulting Snapshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We plan to extend this as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is going to be more specific with respect to each test.&lt;br /&gt;
# We will be introducing fixtures in the tests to modularize the common code in each test.&lt;br /&gt;
# We will try to add more tests if possible to increase the code coverage of the controllers and models.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Demo Video reflecting changes ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo] video for a detailed demonstration of the changes we made in the UI.&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151829</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151829"/>
		<updated>2023-11-28T21:41:05Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Student Grades Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We plan to extend this as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is going to be more specific with respect to each test.&lt;br /&gt;
# We will be introducing fixtures in the tests to modularize the common code in each test.&lt;br /&gt;
# We will try to add more tests if possible to increase the code coverage of the controllers and models.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Resulting Snapshots ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo] video for a rough idea of the UI pages. &lt;br /&gt;
&lt;br /&gt;
=== User Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Course Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Questionnaire Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Review Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Team (Member) Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Student Review Scores Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Student Grades Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151828</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151828"/>
		<updated>2023-11-28T21:40:31Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
==== Student Review Scores Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We plan to extend this as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is going to be more specific with respect to each test.&lt;br /&gt;
# We will be introducing fixtures in the tests to modularize the common code in each test.&lt;br /&gt;
# We will try to add more tests if possible to increase the code coverage of the controllers and models.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Resulting Snapshots ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo] video for a rough idea of the UI pages. &lt;br /&gt;
&lt;br /&gt;
=== User Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Course Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Questionnaire Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Review Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Team (Member) Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Student Review Scores Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Student Grades Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151827</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151827"/>
		<updated>2023-11-28T21:35:33Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Team (Member) Search UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
==== Team (Member) Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We plan to extend this as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is going to be more specific with respect to each test.&lt;br /&gt;
# We will be introducing fixtures in the tests to modularize the common code in each test.&lt;br /&gt;
# We will try to add more tests if possible to increase the code coverage of the controllers and models.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Resulting Snapshots ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo] video for a rough idea of the UI pages. &lt;br /&gt;
&lt;br /&gt;
=== User Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Course Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Questionnaire Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Review Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Team (Member) Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Student Review Scores Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Student Grades Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151826</id>
		<title>CSC/ECE 517 Fall 2023 - E2355. Improving Search Facility In Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2023_-_E2355._Improving_Search_Facility_In_Expertiza&amp;diff=151826"/>
		<updated>2023-11-28T21:35:19Z</updated>

		<summary type="html">&lt;p&gt;Amantra: /* Review Search UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
The [http://expertiza.ncsu.edu/ Expertiza] project makes use of peer review to allow students to learn from one another. It's a Ruby on Rails-based open-source application. It is used by faculty and students for the management of courses and assignments for specific courses. Different screens in the manage content area of the application offer information about users, courses, assignments, questionnaires, and reviews.&lt;br /&gt;
&lt;br /&gt;
The program should have a fully functional search functionality throughout all views, allowing a user to quickly find any sort of data using any number of parameters that meet his needs. Users should be found using one additional parameter, such as their name, full name, email address, and so on. Similarly, assignments should be searched by name, creation date, updated date, and other criteria.&lt;br /&gt;
&lt;br /&gt;
However, the existing application's search functionality is limited to a single parameter for users and assignments. A search feature has not yet been introduced in the management of questionnaires. This project aims to improve Expertiza's search functionality by adding search bars if they aren't already there, creating an advanced search tool that allows users to search using several parameters, and making the search functionality look more appealing.&lt;br /&gt;
&lt;br /&gt;
== Test Login Credentials ==&lt;br /&gt;
&amp;lt;li&amp;gt;UserId: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
#An instructor or administrator can search for a user by name, user ID, or other characteristics.&lt;br /&gt;
#An instructor should be able to search for assignments by name, due date (creation date, updated date), or other characteristics. &lt;br /&gt;
#An instructor should be able to search for rubrics (or other questionnaires) by name, or by the courses or assignments they have been used in.&lt;br /&gt;
##For the instructor, there also needs to be a way to quickly find rubrics (and other questionnaires) that have been used in a single course.  It should be possible to search or click somewhere to bring up a list of questionnaires used in the course, expanding only the applicable questionnaires in the list of questionnaires.&lt;br /&gt;
##One should also be able to search for questionnaires by words used in items (questions) that belong to the questionnaires.&lt;br /&gt;
#There should be a way to search all reviews of a particular team’s work for particular scores or text strings.  Reviews should be able to be filtered by score, text comment length, reviewer, and reviewee.&lt;br /&gt;
#An instructor or administrator should be able to search for all the assignments that a particular user has participated in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of these searches are currently possible in Expertiza, but the user interface is quite cumbersome. This is especially true on an instructor’s or administrator’s homepage, where large and confusing search boxes shift the important parts of the page down to the bottom of the screen. There should be a way to do a simple search by just typing text into an unobtrusive textbox. If more criteria need to be specified, there should be an “advanced search” button or link that opens up additional textboxes, perhaps in Javascript, that are of reasonable size and do not overwhelm other content on the page.&lt;br /&gt;
&lt;br /&gt;
=== E2153 Previous Implementations ===&lt;br /&gt;
#[https://github.com/yhslo/expertiza E2153 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2165 E2153 Pull Request]&lt;br /&gt;
#[https://youtu.be/SxbHz9bp2L0 Demo Video]&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/vishnuchalla/expertiza/tree/beta E2233 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2374 E2233 Pull Request]&lt;br /&gt;
#[https://drive.google.com/file/d/1hAey57B81L0WRtvPL45Kc7ppMeTnaECa/view?usp=sharing Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== E2233 Current Implementation ===&lt;br /&gt;
#[https://github.com/nainisha-b/expertiza E2355 Github Repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2655 E2355 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video]&lt;br /&gt;
&lt;br /&gt;
=== Issue With Previous Implementation ===&lt;br /&gt;
# The code is not readable and there are some parts of the code that still need to DRYed out.&lt;br /&gt;
# The test cases &amp;quot;it&amp;quot; clause must be more specific to the test. This is the same for all the test cases as of now which is quite confusing.&lt;br /&gt;
# All implementations are working on javascript inside tree_display.jsx. There are some changes that are overlapping and confusing to refactor.&lt;br /&gt;
# All the code changes should follow proper ruby naming conventions and there should be enough comments to explain the functionality. But no unnecessary comments too.&lt;br /&gt;
# With compatibility issues, these workers can't be checked in currently.&lt;br /&gt;
# Format is not aligned between course search/assignment search and user search/rubric search.&lt;br /&gt;
# The questionnaire search is not straightforward and the list is not working.&lt;br /&gt;
# Searching for users with &amp;quot;name&amp;quot; and &amp;quot;full name&amp;quot; is confusing.&lt;br /&gt;
# Searching criteria can't be accumulated.&lt;br /&gt;
# Instructors and administrators can't find assignments that a user participates in.&lt;br /&gt;
# There is no search option to find reviews of a particular team.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
&lt;br /&gt;
The design presented in this iteration of the project is very similar to the high-level design proposed last year in [https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]. Since this pull request was not merged, we have included the proposed changes that are credible. Below is a comparable explanation of the previously offered remedy, as well as some new design decisions to improve upon the previous iteration of this issue. &lt;br /&gt;
&lt;br /&gt;
Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and review. Each of these points is searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution.&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
In the current Manage Users view, users can search by Username, Full Name, and Email. We'll keep these three search options but rename &amp;quot;Username&amp;quot; to &amp;quot;User ID&amp;quot; to eliminate confusion with &amp;quot;Full Name.&amp;quot; Users will be able to search regardless of the case of the string. Multiple filters can be applied simultaneously, and the search results will match all of them. If there are no results, an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for User Search====&lt;br /&gt;
[[File:Sequence diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
To improve the current functionality, we propose an advanced search functionality based on the design suggested by the 2022 improvement project with details as follows:&lt;br /&gt;
# To introduce &amp;quot;Advanced Search&amp;quot; functionality:&lt;br /&gt;
## Modify the existing list method in the controller.&lt;br /&gt;
## Remove the simple search in &amp;quot;app/views/users/list.html.erb.&amp;quot;&lt;br /&gt;
## Add a new partial for the search form.&lt;br /&gt;
## Style the user list table with &amp;quot;class=&amp;quot;table table-hover.&amp;quot; &lt;br /&gt;
# To perform the search:&lt;br /&gt;
## Create a form input in &amp;quot;app/views/users/_search.html.erb.&amp;quot;&lt;br /&gt;
## Style the &amp;quot;Search&amp;quot; button with &amp;quot;class='btn btn-primary.'&amp;quot;&lt;br /&gt;
## Style the &amp;quot;text blank&amp;quot; with &amp;quot;class:'form-control.'&amp;quot;&lt;br /&gt;
## The UI contains two search components: &amp;quot;search_field&amp;quot; (always displayed) and &amp;quot;advanced_search_fields&amp;quot; (displayed when &amp;quot;Advanced Search&amp;quot; is ON).&lt;br /&gt;
# In the &amp;quot;users controller.rb&amp;quot;: Add a form input handler to parse the form and provide arguments to the model.&lt;br /&gt;
# In the &amp;quot;get_user_list&amp;quot; method:&lt;br /&gt;
## Implement advanced search in the User model.&lt;br /&gt;
## The method now takes three parameters (user id, full name, e-mail).&lt;br /&gt;
## Use regular expressions to match user fields and allow multiple inputs for comparison.&lt;br /&gt;
## Return results to the controller in @users for rendering in the list view with paginated users.&lt;br /&gt;
&lt;br /&gt;
==== User Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Courses:===&lt;br /&gt;
In the current system, users can search for courses on the Course page using a search box. They have the option to search by course name or use an advanced search with filters for start and end dates, creation and update dates, and the presence of quizzes. However, using multiple filters can lead to inconsistencies, and the system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, we maintain a similar user interface for advanced search but implement it with a DRY approach. We centralize the reusable code and call it when needed. To search by date, users can choose between the creation date and the update date from a dropdown menu with a user-friendly calendar prompt. By applying the DRY approach, we minimize duplicate code and ensure that courses matching the user's filter preferences are returned, while an empty list is presented if there are no matching criteria.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Course Search====&lt;br /&gt;
[[File:Course_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
In the current system, most functionalities, including the advanced search, are already implemented. We'll extend this code based on the 2022 improvement project, optimizing it using the DRY approach to remove duplicate and reused code. The code for advanced search and improved UI can be found in &amp;quot;app/assets/javascripts/tree_display.jsx.&amp;quot; It follows the same format as &amp;quot;User Advanced Search&amp;quot; with components like AdditionalSearchDropDown, DatePicker, and HASQUIZ_TOGGLE. The React component FilterableTable is used for pop-up advanced search.&lt;br /&gt;
&lt;br /&gt;
Key functionalities in the proposed system:&lt;br /&gt;
#Fetching and displaying sub-contents when the user clicks on a course:&lt;br /&gt;
##HTTP POST request sent by `getSubFolderData()` from the FilterableTable component.&lt;br /&gt;
##FilterableTable component's state is updated upon data retrieval.&lt;br /&gt;
##An update triggers the ContentTable component.&lt;br /&gt;
#Course Search: The ContentTable component handles the search method, filtering course names based on user input and selected filters.&lt;br /&gt;
&lt;br /&gt;
The refactoring in the proposed system eliminates code duplication and applies the DRY approach to Course and assignment search functionalities, including advanced search.&lt;br /&gt;
&lt;br /&gt;
==== Course Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
In the current system, users can search by assignment name (partial or whole). In the proposed system, pressing the Advanced Search button enables additional filters for searching assignments by creation date, update date, and quiz inclusion. Users can apply multiple filters simultaneously, and the results will match all selected criteria.&lt;br /&gt;
&lt;br /&gt;
When searching by date, users can choose between creation and modification date from a dropdown menu. They can select a date from a calendar, and tasks created or updated on or before that date will be displayed. Users can apply additional filters by clicking the Advanced Search button next to the Search button, revealing a hidden div with text fields for all columns. Results will include assignments meeting the criteria, and an empty list will be provided if no matching entries are found.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Assignment Search====&lt;br /&gt;
[[File:Assignment_diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Since this component is exclusively defined in &amp;quot;app/assets/javascripts/tree display.jsx,&amp;quot; it can only be implemented using JavaScript. The interactive dropdown search format will match that of &amp;quot;User Advanced Search.&amp;quot; We have created a popup advanced search feature in the React component FilterableTable, utilizing AdditionalSearchDropDown, DatePicker, and HASQUIZ TOGGLE components.&lt;br /&gt;
&lt;br /&gt;
#ContentTable manages the search functionality, filtering course titles that match the user's input.&lt;br /&gt;
#Course and assignment searches share the same code within the FilterableTable component.&lt;br /&gt;
&lt;br /&gt;
==== Assignment Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
The existing system provides search options for the following criteria:&lt;br /&gt;
#Questionnaire name&lt;br /&gt;
#Keyword or a string in a single question within a questionnaire&lt;br /&gt;
#Course name&lt;br /&gt;
#Assignment name&lt;br /&gt;
&lt;br /&gt;
Users can apply multiple filters simultaneously, with results matching all selected criteria. An empty list is returned if no results are found. For a simple search, a default search box is available for questionnaire names. To apply multiple filters, users can click the &amp;quot;Advanced Search&amp;quot; button located next to the &amp;quot;Search&amp;quot; button. Hidden fields with text boxes for all columns are rendered below. The list displays matching questionnaires.&lt;br /&gt;
&lt;br /&gt;
The current system lacks the &amp;quot;Don't Repeat Yourself&amp;quot; (DRY) approach in questionnaire search. We introduce a similar system with minor enhancements to improve questionnaire search effectiveness and adhere to the DRY approach as proposed by the 2022 improvement project.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the user will be able to search questionnaires in the proposed system using an advanced search option similar to the previous one; however, the back-end code for implementing this functionality is refactored by following the DRY Approach. In the file: app/assets/javascripts/tree display.jsx, code that is in common for all the searches is to be refactored.&lt;br /&gt;
&lt;br /&gt;
====Sequence Diagram for Questionnaire Search====&lt;br /&gt;
[[File:Ques diagram.png|500px|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
#When a user presses on a course, the FilterableTable's getSubFolderData() method sends an HTTP POST request.&lt;br /&gt;
#The state of the FilterableTable component is updated after retrieving data, which triggers a re-render of the ContentTable component.&lt;br /&gt;
#For questionnaire search, the FilterableTable handles the method. Pressing the search button filters sub-contents in each questionnaire category based on the user's input.&lt;br /&gt;
#The handleQuestionnaireSearchChange() method in the FilterableTable component tracks the search input field and triggers updates when the field is cleared.&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation:&lt;br /&gt;
In the proposed system, we will use the existing list method, but we'll refactor the back-end code to follow the DRY approach. Specifically, code in app/assets/javascripts/tree display.jsx that is common to all searches will be refactored.&lt;br /&gt;
&lt;br /&gt;
==== Questionnaire Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews of a Team:===&lt;br /&gt;
The &amp;quot;app/views/reports/_review_report.html.erb&amp;quot; file is responsible for rendering a review report table. The table is designed to display reviewer information, the number of reviews completed, the teams reviewed, scores awarded, average scores, metrics, and the ability to assign grades and write comments. It also provides the option to export the review scores to a CSV file. &lt;br /&gt;
&lt;br /&gt;
In the current system, there is no existing search functionality to filter through the rows. We propose to include a search functionality to filter the results in the review report table based on team names. This feature provides users with the ability to narrow down the displayed data, making it easier to find specific teams or reviewers.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Search Input Field: A search input field with the label &amp;quot;Search Team Name&amp;quot; is included in the user interface. Users can enter a team name in this field to specify the filter criteria.&lt;br /&gt;
#Search Button: A &amp;quot;Search&amp;quot; button is provided next to the search input field. Clicking this button triggers the search functionality.&lt;br /&gt;
#JavaScript Search Function: A JavaScript function named &amp;quot;searchTeam()&amp;quot; is defined in the code. This function retrieves the user's input, converts it to lowercase for case-insensitive matching, and then iterates through the rows of the table to find matches.&lt;br /&gt;
#Filtering and Display: When the user initiates a search, the JavaScript function compares the search input with the team names in the table. Rows that match the search criteria are displayed, while non-matching rows are hidden, effectively filtering the results based on the entered team name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Review Search UI ====&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Team (Member) Submissions:===&lt;br /&gt;
&lt;br /&gt;
This section describes how the &amp;quot;app/views/assignments/list_submissions.html.erb&amp;quot; file handles sorting and searching in a table displaying team submissions in an assignment. The table showcases various details, including topic names, team names, team members, and submission links. The primary objective is to enable users to easily sort and search for specific information within the table. In the current system, there is no way to search among the teams by the team name, or to search for a particular team member.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Sorting: The JavaScript code initiates the table sorting functionality. It uses the &amp;quot;tablesorter&amp;quot; library to allow users to sort the table by default when the page loads. This feature provides an intuitive way to arrange data as needed.&lt;br /&gt;
#Table Structure: The table is structured to display topic names, team names, team members, and links. The design ensures that the displayed information is clear and organized.&lt;br /&gt;
#Search Input Fields: Two search input fields, labeled &amp;quot;Search Team Name&amp;quot; and &amp;quot;Search Team Member Name,&amp;quot; are included to facilitate searching. Users can enter text in these fields to filter the table based on team names and team member names.&lt;br /&gt;
#Event Listeners: JavaScript code adds event listeners to the search input fields. When users input text, the corresponding event listener triggers the search functionality.&lt;br /&gt;
#Search Algorithm: The search function compares the user's input with the content in the table. It performs a case-insensitive search, making it user-friendly. The table is searched for matches in both the team name and team member name columns.&lt;br /&gt;
#Row Display Control: Rows in the table are dynamically displayed or hidden based on whether they match the search criteria. This feature allows users to filter and find the information they need effectively.&lt;br /&gt;
#User Interaction: Users can utilize the search input fields to locate specific team names and team members within the table. Additionally, the table can be sorted by clicking on column headers, offering further flexibility in data presentation.&lt;br /&gt;
&lt;br /&gt;
=== Team (Member) Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Reviews Scores):===&lt;br /&gt;
For all the students in a course, the app/views/assessment360/all_students_all_reviews.html.erb contains students, metareviews, and the teammate reviews. The table displays student information, teammate counts, assignment details, and aggregate scores. Additionally, it calculates and displays class averages for the assignment grades, provided certain conditions are met. There is no way to search for a student in the current system. We propose to enhance the user experience by adding a search functionality for filtering students in a table based on their names. &lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Event Listener: The JavaScript code is executed when the DOM (Document Object Model) content has been loaded. It adds an event listener to the input field with the ID &amp;quot;studentSearch&amp;quot; and to all rows in the table with the ID &amp;quot;myTable.&amp;quot;&lt;br /&gt;
#Input Event Handling: When a user types in the &amp;quot;studentSearch&amp;quot; input field, the event listener triggers the input event handling function.&lt;br /&gt;
#Search Text: The user's input is retrieved and converted to lowercase for case-insensitive matching, making the search more user-friendly.&lt;br /&gt;
#Search Algorithm: The code then iterates through each row in the table, starting from the third row (index 2) to avoid affecting the table headers. It accesses the first cell in each row, which contains the student's name, and retrieves the text content in lowercase.&lt;br /&gt;
#Display Control: If the student's name includes the search text, the row is displayed; otherwise, it is hidden by setting the 'style.display' property to either an empty string or 'none,' effectively filtering the results based on the entered student name.&lt;br /&gt;
&lt;br /&gt;
===Search for Student in a Course (Grades):===&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;app/views/assessment360/course_student_grade_summary.html.erb&amp;quot; file, you can find a comprehensive table displaying information about students in a course, including peer scores, instructor grades, and final grades for various assignments. However, the current system lacks a search functionality for quickly locating specific students. To enhance user experience, we've implemented a search feature allowing users to filter students based on their names.&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
&lt;br /&gt;
#Table Styling: A set of styles has been applied to the table, ensuring it is visually appealing and properly formatted.&lt;br /&gt;
#Table Sorting: The JavaScript code includes a table sorting function, enabling users to sort the table by clicking on column headers.&lt;br /&gt;
#Search Input Field: An input field labeled &amp;quot;Search for students...&amp;quot; is provided, where users can enter the name of the student they want to find.&lt;br /&gt;
#Table Structure: The table consists of various columns, including student names, assignment details, and final grades. It is structured to accommodate the display of relevant information.&lt;br /&gt;
#Search Functionality: JavaScript code is included to enable the search functionality. When users type in the search input field, an event listener is triggered.&lt;br /&gt;
#Search Algorithm: The code searches for matches by comparing the user's input with the names displayed in the table. If a match is found, the corresponding row is displayed; otherwise, it is hidden.&lt;br /&gt;
#User Interaction: Users can initiate the search by typing in the input field, and the table will automatically update to display only the relevant rows.&lt;br /&gt;
&lt;br /&gt;
=== ''' Lo-fi UI Example ''' ===&lt;br /&gt;
[[File:Lofi.jpg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== ''' Flowchart ''' ===&lt;br /&gt;
[[File:Flowchart.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
When the project was pulled from the main repository, test plans do not give enough coverage for the additional functionalities that we added. Within the scope of TDD research, we have opted to have the test skeletons by Mustafa Olmez, which has given us a very good idea on the tests that should be integrated into our unit. We plan to extend this as part of our final project. &lt;br /&gt;
&lt;br /&gt;
=== Rspec Unit Tests === &lt;br /&gt;
Functionalities to be tested:&lt;br /&gt;
# Given an unfiltered search result, everything should be included.&lt;br /&gt;
# The filtered search produces a list of items that include the filtered search item.&lt;br /&gt;
# When a search is invalid, an empty list is returned.&lt;br /&gt;
&lt;br /&gt;
==== Code Snippet Modified ====&lt;br /&gt;
Here are some improvements on previously implemented test cases:&lt;br /&gt;
# The &amp;quot;it&amp;quot; clause is going to be more specific with respect to each test.&lt;br /&gt;
# We will be introducing fixtures in the tests to modularize the common code in each test.&lt;br /&gt;
# We will try to add more tests if possible to increase the code coverage of the controllers and models.&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previously proposed solution for this issue.&lt;br /&gt;
Please pair with our [https://www.youtube.com/watch?v=vmjD78GvuOw Demo Video] to confirm our testing&lt;br /&gt;
==== Search for User ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Users&lt;br /&gt;
# Type the search string in the search box available on the UI and select the column to search for from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the specified criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Courses ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria for the course (name, institution, etc) in the available search box and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Assignment ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Questionnaire ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Questionnaires&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# To perform a search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing text boxes for all the columns, allowing the user to search based on multiple columns.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# An empty list is returned if the search criteria don't match any valid records in the database.&lt;br /&gt;
&lt;br /&gt;
==== Search for Reviews of a Team ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Reports&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Select Review Report (default option) from the dropdown and click on View.&lt;br /&gt;
# Type the Team Name that you want to search for in the reviews given by different students.&lt;br /&gt;
&lt;br /&gt;
==== Search for Team (Member) Submissions ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Assignments&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View Submissions&amp;quot; Icon corresponding to the assignment you select.&lt;br /&gt;
# Type the Team Name and the Team Member Name that you want to search by to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Reviews Scores) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View aggregated teammate &amp;amp; meta reviews&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
==== Search for Student in a Course (Grades) ====&lt;br /&gt;
# Log into Expertiza to view the home page&lt;br /&gt;
# Go to Manage &amp;gt; Courses&lt;br /&gt;
# Type the search criteria in the available search criteria and select the appropriate field from the dropdown.&lt;br /&gt;
# All the entries that match the given criteria will be returned.&lt;br /&gt;
# Select the &amp;quot;View grade summary by student&amp;quot; Icon corresponding to the course you select.&lt;br /&gt;
# Type the student name that you want to search for to filter out the results.&lt;br /&gt;
&lt;br /&gt;
== Resulting Snapshots ==&lt;br /&gt;
You can watch this [https://www.youtube.com/watch?v=vmjD78GvuOw demo] video for a rough idea of the UI pages. &lt;br /&gt;
&lt;br /&gt;
=== User Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:User_BeforeEdit.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first image depicts the USER search UI page. The second image depicts the USER page, which allows users to search by userid, name, and e-mail.&lt;br /&gt;
It's worth noting that not all parameters are required for a successful search. You can search using one, two, or all of the options.&lt;br /&gt;
&lt;br /&gt;
[[File:Users 1.png|700px]]&lt;br /&gt;
[[File:Users 2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Course Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Course-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of COURSE searching UI. The second picture shows the searching result that search by created date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Courses_1.png|700px]]&lt;br /&gt;
[[File:Courses_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assignment Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Assignment-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of ASSIGNMENT searching UI. The second picture shows the searching result that search by updated date.&lt;br /&gt;
Note that it doesn't necessarily need all parameters to search. One can search with one or two or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Assignments_1.png|700px]]&lt;br /&gt;
[[File:Assignments_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Questionnaire Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Questionnaire-origin.JPG|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
The first picture shows the main page of the questionnaire searching UI. The second picture shows the questionnaire search page with advanced search and details of the review questionnaire. Note that it doesn't necessarily need all parameters to search. One can search with one, two, or all parameters.&lt;br /&gt;
&lt;br /&gt;
[[File:Questionaires_1.png|700px]]&lt;br /&gt;
[[File:Questionaries_2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Review Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rev2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Team (Member) Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tm2.png|700px]]&lt;br /&gt;
[[File:Tm3.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Student Review Scores Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Rs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Student Grades Search UI ===&lt;br /&gt;
&amp;lt;li&amp;gt;Before Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs1.png|700px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After Change&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Gs2.png|700px]]&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
&lt;br /&gt;
Srilekha Gudipati (sngudipa@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
&lt;br /&gt;
Ananya Mantravadi (amantra@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Anvitha Reddy Gutha (agutha@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
Nainisha Bhallamudi (nbhalla@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki-expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Spring_2022_-_E2233._Improving_search_facility_in_Expertiza Spring 2022 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2153._Improving_search_facility_in_Expertiza Fall 2021 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2020_-_E2079._Improve_Search_Facility_In_Expertiza Fall 2020 Design]&lt;br /&gt;
#[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1987._Improving_search_facility_in_Expertiza Fall 2019 Design]&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://relishapp.com/rspec RSpec Documentation]&lt;/div&gt;</summary>
		<author><name>Amantra</name></author>
	</entry>
</feed>