<?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=Dmbhavsa</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=Dmbhavsa"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Dmbhavsa"/>
	<updated>2026-08-08T00:22:30Z</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_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124732</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124732"/>
		<updated>2019-04-27T03:50:52Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Video Folder Link */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
* Also, placeholders are removed from the search text bars in advanced search because it looked ugly. Also, labels for each search text box has been added directly above it so that the user can easily identify what parameter that text field contains.&lt;br /&gt;
* Also, code has been refactored because it was a lot of bad jumble in all the cases.&lt;br /&gt;
* Comments have been extensively added throughout the code which are informative and helpful&lt;br /&gt;
* Search functionality for Courses has been added as well.&lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
====Courses====&lt;br /&gt;
*Search fields&lt;br /&gt;
**Name&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (101).png|border]]&lt;br /&gt;
* As seen in the image, the advanced search is closed at the start. When it is clicked on, it pops up as shown in the image below.&lt;br /&gt;
* There is also an option of hiding the advanced search bar.&lt;br /&gt;
[[Image:Screenshot (98).png|border]]&lt;br /&gt;
* Important changes made in the pop-up of advanced search bar context was that, before when we tested the functionality it was found that if you had searched something prior in the advanced search bar, then if you hide the advanced search bar, the data remains persistent until it is removed manually.&lt;br /&gt;
* Hence, if you search again now, it will take the prior advanced search criteria into consideration as well. &lt;br /&gt;
* But now, the functionality has been changes to completely erase the data from the text boxes once it is hidden. So unwanted parameters are not included in the search.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
** As extensive as these tests were, everything was found to be working correctly.&lt;br /&gt;
** Feedback was taken as to where changes needed to be made and respective changes were made where necessary.&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
** Tests were included for all the code refactoring done (making new subroutines and moving code.)&lt;br /&gt;
** Also, there were extensive tests written for the search functionality which was dependent on the user that was logged in. &lt;br /&gt;
** Basically, super admin were to be tested on different data than, TAs and instructors.&lt;br /&gt;
** As an example:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
before(:each) do&lt;br /&gt;
      allow(user).to receive_message_chain(&amp;quot;role.super_admin?&amp;quot;) { false }&lt;br /&gt;
      allow(user).to receive_message_chain(&amp;quot;role.instructor?&amp;quot;) { false }&lt;br /&gt;
      allow(user).to receive_message_chain(&amp;quot;role.ta?&amp;quot;) { false }&lt;br /&gt;
      allow(SuperAdministrator).to receive(:get_user_list).and_return([user1, user2])&lt;br /&gt;
      allow(Instructor).to receive(:get_user_list).and_return([user1, user2])&lt;br /&gt;
      allow(Ta).to receive(:get_user_list).and_return([user1, user2])&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'when current user is super admin' do&lt;br /&gt;
      it 'fetches all users' do&lt;br /&gt;
        allow(user).to receive_message_chain(&amp;quot;role.super_admin?&amp;quot;) { true }&lt;br /&gt;
        expect(user.get_user_list).to eq([user1, user2])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'when current user is an instructor' do&lt;br /&gt;
      it 'fetches all users in his/her course/assignment' do&lt;br /&gt;
        allow(user).to receive_message_chain(&amp;quot;role.instructor?&amp;quot;) { true }&lt;br /&gt;
        expect(user.get_user_list).to eq([user1, user2])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Video Folder Link==&lt;br /&gt;
[https://drive.google.com/drive/folders/1n2ad93BbOd1-0BffG_RyTuyZqyphDAdL?usp=sharing|video]&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124731</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124731"/>
		<updated>2019-04-27T03:50:00Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
* Also, placeholders are removed from the search text bars in advanced search because it looked ugly. Also, labels for each search text box has been added directly above it so that the user can easily identify what parameter that text field contains.&lt;br /&gt;
* Also, code has been refactored because it was a lot of bad jumble in all the cases.&lt;br /&gt;
* Comments have been extensively added throughout the code which are informative and helpful&lt;br /&gt;
* Search functionality for Courses has been added as well.&lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
====Courses====&lt;br /&gt;
*Search fields&lt;br /&gt;
**Name&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (101).png|border]]&lt;br /&gt;
* As seen in the image, the advanced search is closed at the start. When it is clicked on, it pops up as shown in the image below.&lt;br /&gt;
* There is also an option of hiding the advanced search bar.&lt;br /&gt;
[[Image:Screenshot (98).png|border]]&lt;br /&gt;
* Important changes made in the pop-up of advanced search bar context was that, before when we tested the functionality it was found that if you had searched something prior in the advanced search bar, then if you hide the advanced search bar, the data remains persistent until it is removed manually.&lt;br /&gt;
* Hence, if you search again now, it will take the prior advanced search criteria into consideration as well. &lt;br /&gt;
* But now, the functionality has been changes to completely erase the data from the text boxes once it is hidden. So unwanted parameters are not included in the search.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
** As extensive as these tests were, everything was found to be working correctly.&lt;br /&gt;
** Feedback was taken as to where changes needed to be made and respective changes were made where necessary.&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
** Tests were included for all the code refactoring done (making new subroutines and moving code.)&lt;br /&gt;
** Also, there were extensive tests written for the search functionality which was dependent on the user that was logged in. &lt;br /&gt;
** Basically, super admin were to be tested on different data than, TAs and instructors.&lt;br /&gt;
** As an example:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
before(:each) do&lt;br /&gt;
      allow(user).to receive_message_chain(&amp;quot;role.super_admin?&amp;quot;) { false }&lt;br /&gt;
      allow(user).to receive_message_chain(&amp;quot;role.instructor?&amp;quot;) { false }&lt;br /&gt;
      allow(user).to receive_message_chain(&amp;quot;role.ta?&amp;quot;) { false }&lt;br /&gt;
      allow(SuperAdministrator).to receive(:get_user_list).and_return([user1, user2])&lt;br /&gt;
      allow(Instructor).to receive(:get_user_list).and_return([user1, user2])&lt;br /&gt;
      allow(Ta).to receive(:get_user_list).and_return([user1, user2])&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'when current user is super admin' do&lt;br /&gt;
      it 'fetches all users' do&lt;br /&gt;
        allow(user).to receive_message_chain(&amp;quot;role.super_admin?&amp;quot;) { true }&lt;br /&gt;
        expect(user.get_user_list).to eq([user1, user2])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'when current user is an instructor' do&lt;br /&gt;
      it 'fetches all users in his/her course/assignment' do&lt;br /&gt;
        allow(user).to receive_message_chain(&amp;quot;role.instructor?&amp;quot;) { true }&lt;br /&gt;
        expect(user.get_user_list).to eq([user1, user2])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Video Folder Link==&lt;br /&gt;
[https://drive.google.com/drive/folders/1n2ad93BbOd1-0BffG_RyTuyZqyphDAdL?usp=sharing]&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124730</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124730"/>
		<updated>2019-04-27T03:46:43Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Test Plan: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
* Also, placeholders are removed from the search text bars in advanced search because it looked ugly. Also, labels for each search text box has been added directly above it so that the user can easily identify what parameter that text field contains.&lt;br /&gt;
* Also, code has been refactored because it was a lot of bad jumble in all the cases.&lt;br /&gt;
* Comments have been extensively added throughout the code which are informative and helpful&lt;br /&gt;
* Search functionality for Courses has been added as well.&lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
====Courses====&lt;br /&gt;
*Search fields&lt;br /&gt;
**Name&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (101).png|border]]&lt;br /&gt;
* As seen in the image, the advanced search is closed at the start. When it is clicked on, it pops up as shown in the image below.&lt;br /&gt;
* There is also an option of hiding the advanced search bar.&lt;br /&gt;
[[Image:Screenshot (98).png|border]]&lt;br /&gt;
* Important changes made in the pop-up of advanced search bar context was that, before when we tested the functionality it was found that if you had searched something prior in the advanced search bar, then if you hide the advanced search bar, the data remains persistent until it is removed manually.&lt;br /&gt;
* Hence, if you search again now, it will take the prior advanced search criteria into consideration as well. &lt;br /&gt;
* But now, the functionality has been changes to completely erase the data from the text boxes once it is hidden. So unwanted parameters are not included in the search.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
** As extensive as these tests were, everything was found to be working correctly.&lt;br /&gt;
** Feedback was taken as to where changes needed to be made and respective changes were made where necessary.&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
** Tests were included for all the code refactoring done (making new subroutines and moving code.)&lt;br /&gt;
** Also, there were extensive tests written for the search functionality which was dependent on the user that was logged in. &lt;br /&gt;
** Basically, super admin were to be tested on different data than, TAs and instructors.&lt;br /&gt;
** As an example:-&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
before(:each) do&lt;br /&gt;
      allow(user).to receive_message_chain(&amp;quot;role.super_admin?&amp;quot;) { false }&lt;br /&gt;
      allow(user).to receive_message_chain(&amp;quot;role.instructor?&amp;quot;) { false }&lt;br /&gt;
      allow(user).to receive_message_chain(&amp;quot;role.ta?&amp;quot;) { false }&lt;br /&gt;
      allow(SuperAdministrator).to receive(:get_user_list).and_return([user1, user2])&lt;br /&gt;
      allow(Instructor).to receive(:get_user_list).and_return([user1, user2])&lt;br /&gt;
      allow(Ta).to receive(:get_user_list).and_return([user1, user2])&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'when current user is super admin' do&lt;br /&gt;
      it 'fetches all users' do&lt;br /&gt;
        allow(user).to receive_message_chain(&amp;quot;role.super_admin?&amp;quot;) { true }&lt;br /&gt;
        expect(user.get_user_list).to eq([user1, user2])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'when current user is an instructor' do&lt;br /&gt;
      it 'fetches all users in his/her course/assignment' do&lt;br /&gt;
        allow(user).to receive_message_chain(&amp;quot;role.instructor?&amp;quot;) { true }&lt;br /&gt;
        expect(user.get_user_list).to eq([user1, user2])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124729</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124729"/>
		<updated>2019-04-27T03:45:27Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Test Plan: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
* Also, placeholders are removed from the search text bars in advanced search because it looked ugly. Also, labels for each search text box has been added directly above it so that the user can easily identify what parameter that text field contains.&lt;br /&gt;
* Also, code has been refactored because it was a lot of bad jumble in all the cases.&lt;br /&gt;
* Comments have been extensively added throughout the code which are informative and helpful&lt;br /&gt;
* Search functionality for Courses has been added as well.&lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
====Courses====&lt;br /&gt;
*Search fields&lt;br /&gt;
**Name&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (101).png|border]]&lt;br /&gt;
* As seen in the image, the advanced search is closed at the start. When it is clicked on, it pops up as shown in the image below.&lt;br /&gt;
* There is also an option of hiding the advanced search bar.&lt;br /&gt;
[[Image:Screenshot (98).png|border]]&lt;br /&gt;
* Important changes made in the pop-up of advanced search bar context was that, before when we tested the functionality it was found that if you had searched something prior in the advanced search bar, then if you hide the advanced search bar, the data remains persistent until it is removed manually.&lt;br /&gt;
* Hence, if you search again now, it will take the prior advanced search criteria into consideration as well. &lt;br /&gt;
* But now, the functionality has been changes to completely erase the data from the text boxes once it is hidden. So unwanted parameters are not included in the search.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
** As extensive as these tests were, everything was found to be working correctly.&lt;br /&gt;
** Feedback was taken as to where changes needed to be made and respective changes were made where necessary.&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
** Tests were included for all the code refactoring done (making new subroutines and moving code.)&lt;br /&gt;
** Also, there were extensive tests written for the search functionality which was dependent on the user that was logged in. &lt;br /&gt;
** Basically, super admin were to be tested on different data than, TAs and instructors.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
before(:each) do&lt;br /&gt;
      allow(user).to receive_message_chain(&amp;quot;role.super_admin?&amp;quot;) { false }&lt;br /&gt;
      allow(user).to receive_message_chain(&amp;quot;role.instructor?&amp;quot;) { false }&lt;br /&gt;
      allow(user).to receive_message_chain(&amp;quot;role.ta?&amp;quot;) { false }&lt;br /&gt;
      allow(SuperAdministrator).to receive(:get_user_list).and_return([user1, user2])&lt;br /&gt;
      allow(Instructor).to receive(:get_user_list).and_return([user1, user2])&lt;br /&gt;
      allow(Ta).to receive(:get_user_list).and_return([user1, user2])&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'when current user is super admin' do&lt;br /&gt;
      it 'fetches all users' do&lt;br /&gt;
        allow(user).to receive_message_chain(&amp;quot;role.super_admin?&amp;quot;) { true }&lt;br /&gt;
        expect(user.get_user_list).to eq([user1, user2])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    context 'when current user is an instructor' do&lt;br /&gt;
      it 'fetches all users in his/her course/assignment' do&lt;br /&gt;
        allow(user).to receive_message_chain(&amp;quot;role.instructor?&amp;quot;) { true }&lt;br /&gt;
        expect(user.get_user_list).to eq([user1, user2])&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124717</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124717"/>
		<updated>2019-04-27T03:04:03Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Proposed Code Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
* Also, placeholders are removed from the search text bars in advanced search because it looked ugly. Also, labels for each search text box has been added directly above it so that the user can easily identify what parameter that text field contains.&lt;br /&gt;
* Also, code has been refactored because it was a lot of bad jumble in all the cases.&lt;br /&gt;
* Comments have been extensively added throughout the code which are informative and helpful&lt;br /&gt;
* Search functionality for Courses has been added as well.&lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
====Courses====&lt;br /&gt;
*Search fields&lt;br /&gt;
**Name&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (101).png|border]]&lt;br /&gt;
* As seen in the image, the advanced search is closed at the start. When it is clicked on, it pops up as shown in the image below.&lt;br /&gt;
* There is also an option of hiding the advanced search bar.&lt;br /&gt;
[[Image:Screenshot (98).png|border]]&lt;br /&gt;
* Important changes made in the pop-up of advanced search bar context was that, before when we tested the functionality it was found that if you had searched something prior in the advanced search bar, then if you hide the advanced search bar, the data remains persistent until it is removed manually.&lt;br /&gt;
* Hence, if you search again now, it will take the prior advanced search criteria into consideration as well. &lt;br /&gt;
* But now, the functionality has been changes to completely erase the data from the text boxes once it is hidden. So unwanted parameters are not included in the search.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124709</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124709"/>
		<updated>2019-04-27T02:59:58Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (101).png|border]]&lt;br /&gt;
* As seen in the image, the advanced search is closed at the start. When it is clicked on, it pops up as shown in the image below.&lt;br /&gt;
* There is also an option of hiding the advanced search bar.&lt;br /&gt;
[[Image:Screenshot (98).png|border]]&lt;br /&gt;
* Important changes made in the pop-up of advanced search bar context was that, before when we tested the functionality it was found that if you had searched something prior in the advanced search bar, then if you hide the advanced search bar, the data remains persistent until it is removed manually.&lt;br /&gt;
* Hence, if you search again now, it will take the prior advanced search criteria into consideration as well. &lt;br /&gt;
* But now, the functionality has been changes to completely erase the data from the text boxes once it is hidden. So unwanted parameters are not included in the search.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124708</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124708"/>
		<updated>2019-04-27T02:59:19Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (101).png|border|700px]]&lt;br /&gt;
* As seen in the image, the advanced search is closed at the start. When it is clicked on, it pops up as shown in the image below.&lt;br /&gt;
* There is also an option of hiding the advanced search bar.&lt;br /&gt;
[[Image:Screenshot (98).png|border|800px]]&lt;br /&gt;
* Important changes made in the pop-up of advanced search bar context was that, before when we tested the functionality it was found that if you had searched something prior in the advanced search bar, then if you hide the advanced search bar, the data remains persistent until it is removed manually.&lt;br /&gt;
* Hence, if you search again now, it will take the prior advanced search criteria into consideration as well. &lt;br /&gt;
* But now, the functionality has been changes to completely erase the data from the text boxes once it is hidden. So unwanted parameters are not included in the search.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124706</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124706"/>
		<updated>2019-04-27T02:58:08Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (101).png|center|700px]]&lt;br /&gt;
* As seen in the image, the advanced search is closed at the start. When it is clicked on, it pops up as shown in the image below.&lt;br /&gt;
* There is also an option of hiding the advanced search bar.&lt;br /&gt;
[[Image:Screenshot (98).png|center|800px]]&lt;br /&gt;
* Important changes made in the pop-up of advanced search bar context was that, before when we tested the functionality it was found that if you had searched something prior in the advanced search bar, then if you hide the advanced search bar, the data remains persistent until it is removed manually.&lt;br /&gt;
* Hence, if you search again now, it will take the prior advanced search criteria into consideration as well. &lt;br /&gt;
* But now, the functionality has been changes to completely erase the data from the text boxes once it is hidden. So unwanted parameters are not included in the search.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124704</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124704"/>
		<updated>2019-04-27T02:57:30Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (101).png|center|500px]]&lt;br /&gt;
* As seen in the image, the advanced search is closed at the start. When it is clicked on, it pops up as shown in the image below.&lt;br /&gt;
* There is also an option of hiding the advanced search bar.&lt;br /&gt;
[[Image:Screenshot (98).png|center|300px]]&lt;br /&gt;
* Important changes made in the pop-up of advanced search bar context was that, before when we tested the functionality it was found that if you had searched something prior in the advanced search bar, then if you hide the advanced search bar, the data remains persistent until it is removed manually.&lt;br /&gt;
* Hence, if you search again now, it will take the prior advanced search criteria into consideration as well. &lt;br /&gt;
* But now, the functionality has been changes to completely erase the data from the text boxes once it is hidden. So unwanted parameters are not included in the search.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124701</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124701"/>
		<updated>2019-04-27T02:56:07Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (101).png|center]]&lt;br /&gt;
* As seen in the image, the advanced search is closed at the start. When it is clicked on, it pops up as shown in the image below.&lt;br /&gt;
* There is also an option of hiding the advanced search bar.&lt;br /&gt;
[[Image:Screenshot (98).png|center]]&lt;br /&gt;
* Important changes made in the pop-up of advanced search bar context was that, before when we tested the functionality it was found that if you had searched something prior in the advanced search bar, then if you hide the advanced search bar, the data remains persistent until it is removed manually.&lt;br /&gt;
* Hence, if you search again now, it will take the prior advanced search criteria into consideration as well. &lt;br /&gt;
* But now, the functionality has been changes to completely erase the data from the text boxes once it is hidden. So unwanted parameters are not included in the search.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124699</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124699"/>
		<updated>2019-04-27T02:55:17Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (101).png]]&lt;br /&gt;
* As seen in the image, the advanced search is closed at the start. When it is clicked on, it pops up as shown in the image below.&lt;br /&gt;
* There is also an option of hiding the advanced search bar.&lt;br /&gt;
[[Image:Screenshot (98).png]]&lt;br /&gt;
* Important changes made in the pop-up of advanced search bar context was that, before when we tested the functionality it was found that if you had searched something prior in the advanced search bar, then if you hide the advanced search bar, the data remains persistent until it is removed manually.&lt;br /&gt;
* Hence, if you search again now, it will take the prior advanced search criteria into consideration as well. &lt;br /&gt;
* But now, the functionality has been changes to completely erase the data from the text boxes once it is hidden. So unwanted parameters are not included in the search.&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124697</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124697"/>
		<updated>2019-04-27T02:51:37Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (101).png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Screenshot (98).png]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124696</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124696"/>
		<updated>2019-04-27T02:51:23Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (101).png]]&lt;br /&gt;
[[Image:Screenshot (98).png]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot_(101).png&amp;diff=124695</id>
		<title>File:Screenshot (101).png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot_(101).png&amp;diff=124695"/>
		<updated>2019-04-27T02:50:00Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124694</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124694"/>
		<updated>2019-04-27T02:47:57Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Photo.png]]&lt;br /&gt;
[[Image:Screenshot (98).png]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124692</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124692"/>
		<updated>2019-04-27T02:46:42Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[Image:photo.png]]&lt;br /&gt;
[[Image:Screenshot (98).png]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124691</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124691"/>
		<updated>2019-04-27T02:45:15Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[Image:Screenshot (100).png]]&lt;br /&gt;
[[Image:Screenshot (98).png]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124690</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124690"/>
		<updated>2019-04-27T02:44:15Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[Image:Screenshot (100).jpg]]&lt;br /&gt;
[[Image:Screenshot (98).png]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124689</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124689"/>
		<updated>2019-04-27T02:43:07Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[Image:Screenshot (100)_Ll.jpg]]&lt;br /&gt;
[[Image:Screenshot (98).png]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124688</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124688"/>
		<updated>2019-04-27T02:42:19Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[Image:Screenshot (100)_Ll.png]]&lt;br /&gt;
[[Image:Screenshot (98).png]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124687</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124687"/>
		<updated>2019-04-27T02:40:04Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[Image:Screenshot (98).png]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124686</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124686"/>
		<updated>2019-04-27T02:39:52Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[Image:Screenshot (98).png|500px|Image:500 pixels]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124685</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124685"/>
		<updated>2019-04-27T02:39:33Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[Image:Screenshot (98).png]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124684</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124684"/>
		<updated>2019-04-27T02:39:21Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (98).png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124683</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124683"/>
		<updated>2019-04-27T02:39:09Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (98).png]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124682</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124682"/>
		<updated>2019-04-27T02:38:55Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (98).png]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124681</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124681"/>
		<updated>2019-04-27T02:38:44Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[Image:Screenshot (98).png]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124680</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124680"/>
		<updated>2019-04-27T02:38:22Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (98).png|500px]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124679</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124679"/>
		<updated>2019-04-27T02:38:12Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (98).png|500px|File:500 pixels]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124678</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124678"/>
		<updated>2019-04-27T02:37:50Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[Image:Screenshot (98).png]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124677</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124677"/>
		<updated>2019-04-27T02:37:39Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[Image:Screenshot (98).png|500px|Image:&lt;br /&gt;
500 pixels]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124676</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124676"/>
		<updated>2019-04-27T02:37:08Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[Image:Screenshot (98).png|500px|Image:500 pixels]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124675</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124675"/>
		<updated>2019-04-27T02:35:01Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (98).png | 500px]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124672</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124672"/>
		<updated>2019-04-27T02:24:36Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot (98).png]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124671</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124671"/>
		<updated>2019-04-27T02:24:15Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot(98).png]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124667</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124667"/>
		<updated>2019-04-27T02:22:47Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
[[File:Screenshot(98).jpg]]&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot_(98).png&amp;diff=124665</id>
		<title>File:Screenshot (98).png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot_(98).png&amp;diff=124665"/>
		<updated>2019-04-27T02:22:13Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124196</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=124196"/>
		<updated>2019-04-23T21:47:02Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;br /&gt;
&lt;br /&gt;
==Pull Request==&lt;br /&gt;
https://github.com/expertiza/expertiza/pull/1452&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=123702</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=123702"/>
		<updated>2019-04-09T03:25:21Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Contributors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;br /&gt;
*Yuzhe Zhu&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=123701</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=123701"/>
		<updated>2019-04-09T03:20:40Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
*Dharmang Bhavsar&lt;br /&gt;
*Vismay Golwala&lt;br /&gt;
*Jason Katsaros&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=123700</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=123700"/>
		<updated>2019-04-09T03:12:09Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: /* Test Plan: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
*User Interface manual testing&lt;br /&gt;
*Automated RSpec testing&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019&amp;diff=123699</id>
		<title>CSC/ECE 517 Spring 2019</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019&amp;diff=123699"/>
		<updated>2019-04-09T03:10:51Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1905. Refactor questionnaires_controller.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1916. Fix Code Climate issues in controllers with names beginning with A through N]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1906. Refactor stage deadlines in Assignment.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project M1901 Implement missing WebAudio automation support]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1917. Fix Code Climate issues in controllers with names beginning with P through Z]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1921. Write tests for popup controller.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - M1902 Refactor bluetooth support for better maintainability]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - E1922. Write tests for assessment360 controller.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1907 Refactor response controller]]&lt;br /&gt;
*[[CSC/ECE_517_Spring_2019_-_Project_E1903._Create_quiz_questionnaires_controller.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Spring_2019_-_Project_E1913. Refactor_review_mapping_helper.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Spring_2019_-_E1919_CodeClimate_Issues]]&lt;br /&gt;
*[[CSC/ECE_517_Spring_2019_-_Project_E1912. Export_Tagged_Comments]]&lt;br /&gt;
*[[CSC/ECE_517_Spring_2019/E1927_Let_Course_Staff_as_Well_as_Students_Do_Reviews]]&lt;br /&gt;
*[[E1911_Refactor_Criterion]]&lt;br /&gt;
*[[E1934 - Grading Audit Trail]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1925. Refactor E1858. Github metrics integration]]&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=123698</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1930. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1930._Improving_Search_Facility_in_Expertiza&amp;diff=123698"/>
		<updated>2019-04-09T03:10:31Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: Created page with &amp;quot;==Introduction:==  The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display informa...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
===User Interface manual testing&lt;br /&gt;
===Automated RSpec testing&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019&amp;diff=123697</id>
		<title>CSC/ECE 517 Spring 2019</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019&amp;diff=123697"/>
		<updated>2019-04-09T02:59:20Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[CSC/ECE 517 Spring 2019 - Project E1909. Improving Search Facility in Expertiza]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1905. Refactor questionnaires_controller.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1916. Fix Code Climate issues in controllers with names beginning with A through N]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1906. Refactor stage deadlines in Assignment.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project M1901 Implement missing WebAudio automation support]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1917. Fix Code Climate issues in controllers with names beginning with P through Z]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1921. Write tests for popup controller.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - M1902 Refactor bluetooth support for better maintainability]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - E1922. Write tests for assessment360 controller.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1907 Refactor response controller]]&lt;br /&gt;
*[[CSC/ECE_517_Spring_2019_-_Project_E1903._Create_quiz_questionnaires_controller.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Spring_2019_-_Project_E1913. Refactor_review_mapping_helper.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Spring_2019_-_E1919_CodeClimate_Issues]]&lt;br /&gt;
*[[CSC/ECE_517_Spring_2019_-_Project_E1912. Export_Tagged_Comments]]&lt;br /&gt;
*[[CSC/ECE_517_Spring_2019/E1927_Let_Course_Staff_as_Well_as_Students_Do_Reviews]]&lt;br /&gt;
*[[E1911_Refactor_Criterion]]&lt;br /&gt;
*[[E1934 - Grading Audit Trail]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2019 - Project E1925. Refactor E1858. Github metrics integration]]&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1909._Improving_Search_Facility_in_Expertiza&amp;diff=123696</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1909. Improving Search Facility in Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1909._Improving_Search_Facility_in_Expertiza&amp;diff=123696"/>
		<updated>2019-04-09T02:58:12Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: Created page with &amp;quot;==Introduction:==  The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display informa...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
=== UI Tests ===&lt;br /&gt;
====Search for User====&lt;br /&gt;
Setup: create a user with name=&amp;quot;student&amp;quot; and userId=&amp;quot;5000&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Action: Instructor clicks on manage - &amp;gt; users -&amp;gt; in textbox enters name=&amp;quot;student&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response: Relevant details of student, name=&amp;quot;student&amp;quot; is displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Action: Instructor clicks on manage - &amp;gt; users -&amp;gt; advanced search-&amp;gt;clicks on checkbox student id and enters &amp;quot;5000&amp;quot; and click &amp;quot;ok&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response: Relevant details of student, name=&amp;quot;student&amp;quot; is displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Assignments====&lt;br /&gt;
Setup create an assignment with name=&amp;quot;assignment&amp;quot; and set a due date&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Action : Instructor clicks on Manage -&amp;gt; Assignments, in textbox enter &amp;quot;assignment&amp;quot; in relevant tab&amp;lt;br&amp;gt; &lt;br /&gt;
Response : Relevant assignment should be displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Instructor clicks on Manage -&amp;gt; Assignments-&amp;gt; drop down and apply filters for due date and enter date and click &amp;quot;ok&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Relevant assignments should be displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Questionnaires====&lt;br /&gt;
Setup : Create a Questionnaire, add questions to it&amp;lt;br&amp;gt;&lt;br /&gt;
Action : Log in as instructor,  Manage -&amp;gt; Questionnaires, in text box enter text&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Questionnaires matching text are shown&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Log in as instructor,  Manage -&amp;gt; Questionnaires, click advanced search and check creation date and enter value&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Questionnaires matching text are shown&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Reviews====&lt;br /&gt;
Setup : Setup review for an assignment, login as student and then add review &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Log in as instructor, Manage -&amp;gt; Assignments, Click on Review Report icon on corresponding assignment&amp;lt;br&amp;gt;&lt;br /&gt;
Result : Review should be seen&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Click Advanced search, check review by text  and enter text&amp;lt;br&amp;gt;  &lt;br /&gt;
Result : Matching review should be visible&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Tests ===&lt;br /&gt;
Automated tests in RSpec will be added as we implement the search functionality for each Model &amp;lt;br&amp;gt;&lt;br /&gt;
Most tests added will be unit tests that cover the test cases for each flow and changes in the model.&amp;lt;br&amp;gt;&lt;br /&gt;
Test Details &lt;br /&gt;
* User Model ( spec/models/user_spec.rb )&lt;br /&gt;
# Search by user name&lt;br /&gt;
# Search by user name that does not exist&lt;br /&gt;
# Search by user email&lt;br /&gt;
# Search by user email that does not exist&lt;br /&gt;
# Search by user email containing a substring&lt;br /&gt;
# Search by user full name&lt;br /&gt;
# Search by user full name is empty&lt;br /&gt;
# Search by user name and email&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User_talk:Dmbhavsa&amp;diff=123695</id>
		<title>User talk:Dmbhavsa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User_talk:Dmbhavsa&amp;diff=123695"/>
		<updated>2019-04-09T02:53:01Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
=== UI Tests ===&lt;br /&gt;
====Search for User====&lt;br /&gt;
Setup: create a user with name=&amp;quot;student&amp;quot; and userId=&amp;quot;5000&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Action: Instructor clicks on manage - &amp;gt; users -&amp;gt; in textbox enters name=&amp;quot;student&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response: Relevant details of student, name=&amp;quot;student&amp;quot; is displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Action: Instructor clicks on manage - &amp;gt; users -&amp;gt; advanced search-&amp;gt;clicks on checkbox student id and enters &amp;quot;5000&amp;quot; and click &amp;quot;ok&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response: Relevant details of student, name=&amp;quot;student&amp;quot; is displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Assignments====&lt;br /&gt;
Setup create an assignment with name=&amp;quot;assignment&amp;quot; and set a due date&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Action : Instructor clicks on Manage -&amp;gt; Assignments, in textbox enter &amp;quot;assignment&amp;quot; in relevant tab&amp;lt;br&amp;gt; &lt;br /&gt;
Response : Relevant assignment should be displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Instructor clicks on Manage -&amp;gt; Assignments-&amp;gt; drop down and apply filters for due date and enter date and click &amp;quot;ok&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Relevant assignments should be displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Questionnaires====&lt;br /&gt;
Setup : Create a Questionnaire, add questions to it&amp;lt;br&amp;gt;&lt;br /&gt;
Action : Log in as instructor,  Manage -&amp;gt; Questionnaires, in text box enter text&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Questionnaires matching text are shown&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Log in as instructor,  Manage -&amp;gt; Questionnaires, click advanced search and check creation date and enter value&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Questionnaires matching text are shown&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Reviews====&lt;br /&gt;
Setup : Setup review for an assignment, login as student and then add review &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Log in as instructor, Manage -&amp;gt; Assignments, Click on Review Report icon on corresponding assignment&amp;lt;br&amp;gt;&lt;br /&gt;
Result : Review should be seen&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Click Advanced search, check review by text  and enter text&amp;lt;br&amp;gt;  &lt;br /&gt;
Result : Matching review should be visible&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Tests ===&lt;br /&gt;
Automated tests in RSpec will be added as we implement the search functionality for each Model &amp;lt;br&amp;gt;&lt;br /&gt;
Most tests added will be unit tests that cover the test cases for each flow and changes in the model.&amp;lt;br&amp;gt;&lt;br /&gt;
Test Details &lt;br /&gt;
* User Model ( spec/models/user_spec.rb )&lt;br /&gt;
# Search by user name&lt;br /&gt;
# Search by user name that does not exist&lt;br /&gt;
# Search by user email&lt;br /&gt;
# Search by user email that does not exist&lt;br /&gt;
# Search by user email containing a substring&lt;br /&gt;
# Search by user full name&lt;br /&gt;
# Search by user full name is empty&lt;br /&gt;
# Search by user name and email&lt;br /&gt;
&lt;br /&gt;
==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
=== UI Tests ===&lt;br /&gt;
====Search for User====&lt;br /&gt;
Setup: create a user with name=&amp;quot;student&amp;quot; and userId=&amp;quot;5000&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Action: Instructor clicks on manage - &amp;gt; users -&amp;gt; in textbox enters name=&amp;quot;student&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response: Relevant details of student, name=&amp;quot;student&amp;quot; is displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Action: Instructor clicks on manage - &amp;gt; users -&amp;gt; advanced search-&amp;gt;clicks on checkbox student id and enters &amp;quot;5000&amp;quot; and click &amp;quot;ok&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response: Relevant details of student, name=&amp;quot;student&amp;quot; is displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Assignments====&lt;br /&gt;
Setup create an assignment with name=&amp;quot;assignment&amp;quot; and set a due date&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Action : Instructor clicks on Manage -&amp;gt; Assignments, in textbox enter &amp;quot;assignment&amp;quot; in relevant tab&amp;lt;br&amp;gt; &lt;br /&gt;
Response : Relevant assignment should be displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Instructor clicks on Manage -&amp;gt; Assignments-&amp;gt; drop down and apply filters for due date and enter date and click &amp;quot;ok&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Relevant assignments should be displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Questionnaires====&lt;br /&gt;
Setup : Create a Questionnaire, add questions to it&amp;lt;br&amp;gt;&lt;br /&gt;
Action : Log in as instructor,  Manage -&amp;gt; Questionnaires, in text box enter text&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Questionnaires matching text are shown&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Log in as instructor,  Manage -&amp;gt; Questionnaires, click advanced search and check creation date and enter value&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Questionnaires matching text are shown&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Reviews====&lt;br /&gt;
Setup : Setup review for an assignment, login as student and then add review &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Log in as instructor, Manage -&amp;gt; Assignments, Click on Review Report icon on corresponding assignment&amp;lt;br&amp;gt;&lt;br /&gt;
Result : Review should be seen&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Click Advanced search, check review by text  and enter text&amp;lt;br&amp;gt;  &lt;br /&gt;
Result : Matching review should be visible&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Tests ===&lt;br /&gt;
Automated tests in RSpec will be added as we implement the search functionality for each Model &amp;lt;br&amp;gt;&lt;br /&gt;
Most tests added will be unit tests that cover the test cases for each flow and changes in the model.&amp;lt;br&amp;gt;&lt;br /&gt;
Test Details &lt;br /&gt;
* User Model ( spec/models/user_spec.rb )&lt;br /&gt;
# Search by user name&lt;br /&gt;
# Search by user name that does not exist&lt;br /&gt;
# Search by user email&lt;br /&gt;
# Search by user email that does not exist&lt;br /&gt;
# Search by user email containing a substring&lt;br /&gt;
# Search by user full name&lt;br /&gt;
# Search by user full name is empty&lt;br /&gt;
# Search by user name and email&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User_talk:Dmbhavsa&amp;diff=123694</id>
		<title>User talk:Dmbhavsa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User_talk:Dmbhavsa&amp;diff=123694"/>
		<updated>2019-04-09T02:52:44Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: Created page with &amp;quot;==Introduction:==  The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display informa...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
=== UI Tests ===&lt;br /&gt;
====Search for User====&lt;br /&gt;
Setup: create a user with name=&amp;quot;student&amp;quot; and userId=&amp;quot;5000&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Action: Instructor clicks on manage - &amp;gt; users -&amp;gt; in textbox enters name=&amp;quot;student&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response: Relevant details of student, name=&amp;quot;student&amp;quot; is displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Action: Instructor clicks on manage - &amp;gt; users -&amp;gt; advanced search-&amp;gt;clicks on checkbox student id and enters &amp;quot;5000&amp;quot; and click &amp;quot;ok&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response: Relevant details of student, name=&amp;quot;student&amp;quot; is displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Assignments====&lt;br /&gt;
Setup create an assignment with name=&amp;quot;assignment&amp;quot; and set a due date&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Action : Instructor clicks on Manage -&amp;gt; Assignments, in textbox enter &amp;quot;assignment&amp;quot; in relevant tab&amp;lt;br&amp;gt; &lt;br /&gt;
Response : Relevant assignment should be displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Instructor clicks on Manage -&amp;gt; Assignments-&amp;gt; drop down and apply filters for due date and enter date and click &amp;quot;ok&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Relevant assignments should be displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Questionnaires====&lt;br /&gt;
Setup : Create a Questionnaire, add questions to it&amp;lt;br&amp;gt;&lt;br /&gt;
Action : Log in as instructor,  Manage -&amp;gt; Questionnaires, in text box enter text&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Questionnaires matching text are shown&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Log in as instructor,  Manage -&amp;gt; Questionnaires, click advanced search and check creation date and enter value&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Questionnaires matching text are shown&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Reviews====&lt;br /&gt;
Setup : Setup review for an assignment, login as student and then add review &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Log in as instructor, Manage -&amp;gt; Assignments, Click on Review Report icon on corresponding assignment&amp;lt;br&amp;gt;&lt;br /&gt;
Result : Review should be seen&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Click Advanced search, check review by text  and enter text&amp;lt;br&amp;gt;  &lt;br /&gt;
Result : Matching review should be visible&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Tests ===&lt;br /&gt;
Automated tests in RSpec will be added as we implement the search functionality for each Model &amp;lt;br&amp;gt;&lt;br /&gt;
Most tests added will be unit tests that cover the test cases for each flow and changes in the model.&amp;lt;br&amp;gt;&lt;br /&gt;
Test Details &lt;br /&gt;
* User Model ( spec/models/user_spec.rb )&lt;br /&gt;
# Search by user name&lt;br /&gt;
# Search by user name that does not exist&lt;br /&gt;
# Search by user email&lt;br /&gt;
# Search by user email that does not exist&lt;br /&gt;
# Search by user email containing a substring&lt;br /&gt;
# Search by user full name&lt;br /&gt;
# Search by user full name is empty&lt;br /&gt;
# Search by user name and email&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1905._Refactor_questionnaires_controller.rb&amp;diff=123693</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1905. Refactor questionnaires controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1905._Refactor_questionnaires_controller.rb&amp;diff=123693"/>
		<updated>2019-04-09T02:50:27Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: Bug image fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Description of the project===&lt;br /&gt;
The questionnaires controller had several issues; this project aimed to address some of them, including:&lt;br /&gt;
&lt;br /&gt;
* Remove or move logic that should reside elsewhere, e.g. in a model class.&lt;br /&gt;
* Remove logic and references to logic that is no longer being used.&lt;br /&gt;
&lt;br /&gt;
===Files modified in the project===&lt;br /&gt;
# app/controllers/questionnaires_controller.rb&lt;br /&gt;
# app/models/questionnaire.rb&lt;br /&gt;
# app/views/questionnaires/_questionnaire.html.erb&lt;br /&gt;
# app/views/questionnaires/edit_questionnaire.html.erb (deleted)&lt;br /&gt;
# spec/controllers/questionnaires_controller_spec.rb&lt;br /&gt;
# spec/models/questionnaire_spec.rb&lt;br /&gt;
&lt;br /&gt;
===Issues and Improvements===&lt;br /&gt;
&lt;br /&gt;
====The ''assign_instructor_id'' method====&lt;br /&gt;
&lt;br /&gt;
=====Problems=====&lt;br /&gt;
This method had two issues:&lt;br /&gt;
# Its name was misleading because it did not actually assign a value; it simply obtained a value from the user in the session.&lt;br /&gt;
# It was delving into implementation details of the ''User'' class.&lt;br /&gt;
&lt;br /&gt;
=====Solution=====&lt;br /&gt;
The equivalent logic was already implemented in the ''User'' class's ''instructor_id'' method, so calls to the ''assign_instructor_id'' method were simply replaced with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
session[:user].instructor_id&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A description in ''spec/controllers/questionnaires_controller_spec.rb'' was updated to reflect that ''assign_instructor_id'' was no longer in scope.&lt;br /&gt;
&lt;br /&gt;
====The ''export'' and ''import'' methods and ''edit_questionnaires.html.erb''====&lt;br /&gt;
&lt;br /&gt;
=====Problems=====&lt;br /&gt;
These methods were actually no longer being used, because the functionality they provided was moved to the ''export_file'' and ''import_file'' routes.&lt;br /&gt;
&lt;br /&gt;
=====Solution=====&lt;br /&gt;
* The logic was triggered by the presence of the parameters ''import'' or ''export'' in the ''save_all_questions'' action.  Code that caused these parameters to be present had been commented out of ''_questionnaire.html.erb'' and ''edit_questionnaire.html.erb'' in the questionnaire views.  The latter file was no longer reachable, as there was no reference to an ''edit_questionnaire'' action in ''config/routes.rb'' or any direct references to it in the questionnaires controller itself.  Thus the commented-out code was removed from ''_questionnaire.html.erb'' and the ''edit_questionnaire.html.erb'' file was deleted.&lt;br /&gt;
* The logic referencing the parameters and methods was removed from the ''save_all_questions'' method.&lt;br /&gt;
&lt;br /&gt;
====The 'copy' and 'copy_questionnaire_details' methods====&lt;br /&gt;
&lt;br /&gt;
=====Problems=====&lt;br /&gt;
&lt;br /&gt;
#There were two methods ''copy'' and ''copy_questionnaire_details'' present in app/controllers/questionnaire_controller.rb which implemented just one functionality of making a copy of a particular questionnaire.&lt;br /&gt;
#There was no need of two methods in the controller itself. Also, some parts of what was happening needed to be in the model.&lt;br /&gt;
&lt;br /&gt;
=====Solution=====&lt;br /&gt;
* Nothing special was happening in the ''copy_questionnaire_details'' method. Also, it needed to be placed into the model because of the nature of things happening inside it.&lt;br /&gt;
* So, now we have one method ''copy'' in the controller, which calls the ''copy_questionnaire_details'' method, which is present in the Questionnaire model. The instructor_id as well as the params are passed as arguments to the ''copy_questionnaire_details'' method.&lt;br /&gt;
* The other methods that the older ''copy_questionnaire_details'' methods used to call, like ''assign_instructor_id'' were removed in the changes above and they are now included in the method in the model itself.&lt;br /&gt;
* The Exception (if it occurs while saving the Questionnaire object) is being handled in the ''copy'' method of the controller so that the user can be redirected easily.&lt;br /&gt;
&lt;br /&gt;
====Making code DRYer====&lt;br /&gt;
&lt;br /&gt;
=====Problems=====&lt;br /&gt;
&lt;br /&gt;
#There were parts of the code, specifically when QuizQuestionChoice was created, which was copied throughout the questionnaires_controller.rb. &lt;br /&gt;
&lt;br /&gt;
=====Solution=====&lt;br /&gt;
* To make the code DRYer, the repeating code sequences were added into a function called ''create_quiz_question_choice''.&lt;br /&gt;
* Calls were made to this method wherever QuizQuestionChoice was made.&lt;br /&gt;
&lt;br /&gt;
=== Test Plan ===&lt;br /&gt;
There is no means of testing the removal of dead code, except to run the existing suite of test cases:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec spec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Removal of the ''assign_instructor_id'' method can be tested by running test cases for the questionnaires controller, since existing test cases rely on the instructor ID being retrieved correctly:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec spec/controllers/questionnaires_controller_spec.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Testing the method ''create_quiz_question_choice'' can likewise be done with this command. &lt;br /&gt;
The logic associated with getting the instructor ID from a user is tested using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec spec/models/user_spec.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The additions to the questionnaires model can be tested using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec spec/models/questionnaire_spec.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: If you are having difficulties running the ''rspec'' command, try using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bundle exec rspec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
instead.  This will use the gems specified in ''Gemfile'' that were installed via ''bundle install''.&lt;br /&gt;
&lt;br /&gt;
Also, tests were included for the code movement from the questionnaires controller to the questionnaire model. Checks were being made for database calls in the controller rspec method, the same format was followed while writing tests for the moved methods.&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Dmbhavsa&amp;diff=123692</id>
		<title>User:Dmbhavsa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Dmbhavsa&amp;diff=123692"/>
		<updated>2019-04-09T02:40:40Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: E1909: Search functionality in Expertiza&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction:==&lt;br /&gt;
&lt;br /&gt;
The Expertiza application running on Ruby on Rails is used for a variety of purposes by students and faculty members. There are many pages that display information about students, assignments, rubrics and reviews. The information is displayed with attributes like name, ID, due date etc. This project works on improving the search facility by adding search criteria in existing search bars, making it look elegant and adding search bars if not present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Problem Definition:==&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, 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 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;
#If more than one criteria needs to be specified, there should be an 'Advanced Search' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution:==&lt;br /&gt;
&lt;br /&gt;
===Search for User:===&lt;br /&gt;
&lt;br /&gt;
In the current system workflow the user is able to search for a particular user by entering a partial or a complete text that matches with the user name. In the proposed workflow searching by name, searching by User ID will also be supported. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Users&lt;br /&gt;
:#Type the name of the user in the search box available below the ‘Users’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters. &lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Assignments:===&lt;br /&gt;
&lt;br /&gt;
In the current system implementation, searching via the name of the assignment is supported. In the proposed system, the user will be able to search for an assignment using additional filters such as date created, date updated. The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for an assignment by creation date, the user can enter a time duration within which the assignment was created. All assignments that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update.&lt;br /&gt;
&lt;br /&gt;
Steps to reproduce the proposed workflow:&lt;br /&gt;
:#Log in to expertiza to view the home page&lt;br /&gt;
:#Go to Manage &amp;gt; Assignments&lt;br /&gt;
:#Type the name of the assignment in the search box available below the ‘Assignments’ tab&lt;br /&gt;
:#In the dropdown list that opens up, click on the ‘Advanced Search’ button if you                                                                                                                                                         wish to apply more filters ( date of creation, date updated).&lt;br /&gt;
:#All the entries that match the given criteria will be returned.&lt;br /&gt;
&lt;br /&gt;
===Search for Questionnaires:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Questionnaires. The proposed system will implement a search functionality for searching via the name of the questionnaire, the text in the question within a questionnaire, date of creation, date updated.  The user will be able to apply multiple filters at a time and the output of the query will match all filter applied. If no results are found an empty list will be returned.&lt;br /&gt;
&lt;br /&gt;
To search for a course by creation date, the user can enter a time duration within which the course was created. All courses that were created within this date range and which match other filters will be returned. The procedure is same for searching by date of update. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.&lt;br /&gt;
&lt;br /&gt;
All the above will be available under Manage &amp;gt; Questionnaires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Search for Reviews:===&lt;br /&gt;
&lt;br /&gt;
The existing system does not have a search functionality under Reviews. The proposed system will implement a search functionality for searching using the attributes like team name, score, reviewer, comment etc.&lt;br /&gt;
&lt;br /&gt;
==Use Case Diagram==&lt;br /&gt;
[[File:Usecase search.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Proposed Code Changes ==&lt;br /&gt;
We though about 2 ways of adding the search functionality in the system &lt;br /&gt;
:# Adding a search controller to the system  &lt;br /&gt;
:# Adding search functionality to individual models &lt;br /&gt;
&lt;br /&gt;
===Adding a search controller ===&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
*localhost:port/search/user?name=&amp;lt;&amp;gt;&lt;br /&gt;
*localhost:port/search/assignment?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would mean that we are thinking of search as a resource on the system which to us looked as a wrong approach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adding search functionality to individual models===&lt;br /&gt;
&lt;br /&gt;
If we followed this approach the search query would be like &lt;br /&gt;
:#localhost:port/user/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
:#localhost:port/assignment/search?name=&amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On discussions we concluded that that the latter was a more RESTFul design &lt;br /&gt;
For most of the cases we have tried to minimize the changes required in the respective model by  reuse&lt;br /&gt;
We propose to add search methods in each model for corresponding changes. &lt;br /&gt;
&lt;br /&gt;
Therefore in order to perform search every entity required changes in all the three layers &lt;br /&gt;
*View : Changes in view are changes added to UI, and it is used to pass search parameters to controller &lt;br /&gt;
*Controller : Parses the changes from UI, essentially takes params[] hash.&lt;br /&gt;
*Model : Bulk of search logic is implemented here, once the model gets the parameters for the search ( hash ), the query is incrementally built using all the params and then executed to get the list of objects. &lt;br /&gt;
&lt;br /&gt;
User changes have been handled differently than for Questionnaire, Assignments and Review because Users follows the traditional RoR scheme, where as others user React for UI. &lt;br /&gt;
React based View changes are in app/assets/javascripts/tree_display.jsx.   &lt;br /&gt;
&lt;br /&gt;
====User====&lt;br /&gt;
* Search fields&lt;br /&gt;
** username&lt;br /&gt;
** name&lt;br /&gt;
** email&lt;br /&gt;
&lt;br /&gt;
* Modified files:&lt;br /&gt;
** app/views/users/list.html.erb&lt;br /&gt;
** app/controllers/users_controller.rb&lt;br /&gt;
** app/models/user.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** UsersController#list : Parses the username, name and email from the params hash. &lt;br /&gt;
** User#get_user_list : Model returns list of users to the view, changes in this function uses regex to filter out the entries that do not match search params.&lt;br /&gt;
&lt;br /&gt;
====Assignment====&lt;br /&gt;
* Search fields &lt;br /&gt;
** name&lt;br /&gt;
** assignee_username&lt;br /&gt;
** assignee_name&lt;br /&gt;
** due_date_before&lt;br /&gt;
** due_date_after&lt;br /&gt;
** created_before&lt;br /&gt;
** created_after&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#initialize_fnode_update_children&lt;br /&gt;
** TreeDisplayController#update_fnode_children&lt;br /&gt;
** AssignmentNode.get&lt;br /&gt;
&lt;br /&gt;
====Questionnaire====&lt;br /&gt;
* Search fields&lt;br /&gt;
** name&lt;br /&gt;
** text&lt;br /&gt;
** course&lt;br /&gt;
** assignment&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/assets/javascripts/tree_display.jsx&lt;br /&gt;
** app/controllers/tree_display_controller.rb&lt;br /&gt;
** app/models/questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** TreeDisplayController#get_tmp_res&lt;br /&gt;
** QuestionnaireNode.get&lt;br /&gt;
&lt;br /&gt;
====Review====&lt;br /&gt;
* Search fields&lt;br /&gt;
** team&lt;br /&gt;
** text&lt;br /&gt;
** min_score&lt;br /&gt;
** max_score&lt;br /&gt;
&lt;br /&gt;
* Modified files&lt;br /&gt;
** app/views/review_mapping/_searchbox.html.erb&lt;br /&gt;
** app/controllers/review_mapping_controller.rb&lt;br /&gt;
** app/helpers/summary_helper.rb&lt;br /&gt;
&lt;br /&gt;
* Modified functions&lt;br /&gt;
** ReviewMappingController#response_report&lt;br /&gt;
** SummaryHelper#summarize_reviews_by_reviewees&lt;br /&gt;
&lt;br /&gt;
==Database Design==&lt;br /&gt;
&lt;br /&gt;
===ER Diagram:===&lt;br /&gt;
The simplified version of ER Diagram depicts relationships between the entity sets that are used in the system. Many-to-many relationships are identified by named-diamonds - teams_users, assignment_questionnaires, which are implemented as tables.&lt;br /&gt;
[[File:ER diagram.png|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Relevant Tables===&lt;br /&gt;
[[File:User table.png|center]]&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-11-20 at 11.42.06 PM.png|center]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan: ==&lt;br /&gt;
We plan to two types of testing &lt;br /&gt;
=== UI Tests ===&lt;br /&gt;
====Search for User====&lt;br /&gt;
Setup: create a user with name=&amp;quot;student&amp;quot; and userId=&amp;quot;5000&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Action: Instructor clicks on manage - &amp;gt; users -&amp;gt; in textbox enters name=&amp;quot;student&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response: Relevant details of student, name=&amp;quot;student&amp;quot; is displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Action: Instructor clicks on manage - &amp;gt; users -&amp;gt; advanced search-&amp;gt;clicks on checkbox student id and enters &amp;quot;5000&amp;quot; and click &amp;quot;ok&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response: Relevant details of student, name=&amp;quot;student&amp;quot; is displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Assignments====&lt;br /&gt;
Setup create an assignment with name=&amp;quot;assignment&amp;quot; and set a due date&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Action : Instructor clicks on Manage -&amp;gt; Assignments, in textbox enter &amp;quot;assignment&amp;quot; in relevant tab&amp;lt;br&amp;gt; &lt;br /&gt;
Response : Relevant assignment should be displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Instructor clicks on Manage -&amp;gt; Assignments-&amp;gt; drop down and apply filters for due date and enter date and click &amp;quot;ok&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Relevant assignments should be displayed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Questionnaires====&lt;br /&gt;
Setup : Create a Questionnaire, add questions to it&amp;lt;br&amp;gt;&lt;br /&gt;
Action : Log in as instructor,  Manage -&amp;gt; Questionnaires, in text box enter text&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Questionnaires matching text are shown&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Log in as instructor,  Manage -&amp;gt; Questionnaires, click advanced search and check creation date and enter value&amp;lt;br&amp;gt;&lt;br /&gt;
Response : Questionnaires matching text are shown&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Search for Reviews====&lt;br /&gt;
Setup : Setup review for an assignment, login as student and then add review &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Log in as instructor, Manage -&amp;gt; Assignments, Click on Review Report icon on corresponding assignment&amp;lt;br&amp;gt;&lt;br /&gt;
Result : Review should be seen&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action : Click Advanced search, check review by text  and enter text&amp;lt;br&amp;gt;  &lt;br /&gt;
Result : Matching review should be visible&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Tests ===&lt;br /&gt;
Automated tests in RSpec will be added as we implement the search functionality for each Model &amp;lt;br&amp;gt;&lt;br /&gt;
Most tests added will be unit tests that cover the test cases for each flow and changes in the model.&amp;lt;br&amp;gt;&lt;br /&gt;
Test Details &lt;br /&gt;
* User Model ( spec/models/user_spec.rb )&lt;br /&gt;
# Search by user name&lt;br /&gt;
# Search by user name that does not exist&lt;br /&gt;
# Search by user email&lt;br /&gt;
# Search by user email that does not exist&lt;br /&gt;
# Search by user email containing a substring&lt;br /&gt;
# Search by user full name&lt;br /&gt;
# Search by user full name is empty&lt;br /&gt;
# Search by user name and email&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1905._Refactor_questionnaires_controller.rb&amp;diff=123152</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1905. Refactor questionnaires controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1905._Refactor_questionnaires_controller.rb&amp;diff=123152"/>
		<updated>2019-04-02T16:05:05Z</updated>

		<summary type="html">&lt;p&gt;Dmbhavsa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Example.jpg]]__TOC__&lt;br /&gt;
&lt;br /&gt;
===Description of the project===&lt;br /&gt;
The questionnaires controller had several issues; this project aimed to address some of them, including:&lt;br /&gt;
&lt;br /&gt;
* Remove or move logic that should reside elsewhere, e.g. in a model class.&lt;br /&gt;
* Remove logic and references to logic that is no longer being used.&lt;br /&gt;
&lt;br /&gt;
===Files modified in the project===&lt;br /&gt;
# app/controllers/questionnaires_controller.rb&lt;br /&gt;
# app/models/questionnaire.rb&lt;br /&gt;
# app/views/questionnaires/_questionnaire.html.erb&lt;br /&gt;
# app/views/questionnaires/edit_questionnaire.html.erb (deleted)&lt;br /&gt;
# spec/controllers/questionnaires_controller_spec.rb&lt;br /&gt;
# spec/models/questionnaire_spec.rb&lt;br /&gt;
&lt;br /&gt;
===Issues and Improvements===&lt;br /&gt;
&lt;br /&gt;
====The ''assign_instructor_id'' method====&lt;br /&gt;
&lt;br /&gt;
=====Problems=====&lt;br /&gt;
This method had two issues:&lt;br /&gt;
# Its name was misleading because it did not actually assign a value; it simply obtained a value from the user in the session.&lt;br /&gt;
# It was delving into implementation details of the ''User'' class.&lt;br /&gt;
&lt;br /&gt;
=====Solution=====&lt;br /&gt;
The equivalent logic was already implemented in the ''User'' class's ''instructor_id'' method, so calls to the ''assign_instructor_id'' method were simply replaced with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
session[:user].instructor_id&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A description in ''spec/controllers/questionnaires_controller_spec.rb'' was updated to reflect that ''assign_instructor_id'' was no longer in scope.&lt;br /&gt;
&lt;br /&gt;
====The ''export'' and ''import'' methods====&lt;br /&gt;
&lt;br /&gt;
=====Problems=====&lt;br /&gt;
These methods were actually no longer being used, because the functionality they provided was moved to the ''export_file'' and ''import_file'' routes.&lt;br /&gt;
&lt;br /&gt;
=====Solution=====&lt;br /&gt;
* The logic was triggered by the presence of the parameters ''import'' or ''export'' in the ''save_all_questions'' action.  Code that caused these parameters to be present had been commented out of ''_questionnaire.html.erb'' and ''edit_questionnaire.html.erb'' in the questionnaire views.  The latter file was no longer reachable, as there was no reference to an ''edit_questionnaire'' action in ''config/routes.rb'' or any direct references to it in the questionnaires controller itself.  Thus the commented-out code was removed from ''_questionnaire.html.erb'' and the ''edit_questionnaire.html.erb'' file was deleted.&lt;br /&gt;
* The logic referencing the parameters and methods was removed from the ''save_all_questions'' method.&lt;br /&gt;
&lt;br /&gt;
====The 'copy' and 'copy_questionnaire_details' methods====&lt;br /&gt;
&lt;br /&gt;
=====Problems=====&lt;br /&gt;
&lt;br /&gt;
#There were two methods ''copy'' and ''copy_questionnaire_details'' present in app/controllers/questionnaire_controller.rb which implemented just one functionality of making a copy of a particular questionnaire.&lt;br /&gt;
#There was no need of two methods in the controller itself. Also, some parts of what was happening needed to be in the model.&lt;br /&gt;
&lt;br /&gt;
=====Solution=====&lt;br /&gt;
* Nothing special was happening in the ''copy_questionnaire_details'' method. Also, it needed to be placed into the model because of the nature of things happening inside it.&lt;br /&gt;
* So, now we have one method ''copy'' in the controller, which calls the ''copy_questionnaire_details'' method, which is present in the Questionnaire model. The instructor_id as well as the params are passed as arguments to the ''copy_questionnaire_details'' method.&lt;br /&gt;
* The other methods that the older ''copy_questionnaire_details'' methods used to call, like ''assign_instructor_id'' were removed in the changes above and they are now included in the method in the model itself.&lt;br /&gt;
* The Exception (if it occurs while saving the Questionnaire object) is being handled in the ''copy'' method of the controller so that the user can be redirected easily.&lt;br /&gt;
&lt;br /&gt;
====Making code DRYer====&lt;br /&gt;
&lt;br /&gt;
=====Problems=====&lt;br /&gt;
&lt;br /&gt;
#There were parts of the code, specifically when QuizQuestionChoice was created, which was copied throughout the questionnaires_controller.rb. &lt;br /&gt;
&lt;br /&gt;
=====Solution=====&lt;br /&gt;
* To make the code DRYer, the repeating code sequences were added into a function called ''create_quiz_question_choice''.&lt;br /&gt;
* Calls were made to this method wherever QuizQuestionChoice was made.&lt;br /&gt;
&lt;br /&gt;
=== Test Plan ===&lt;br /&gt;
There is no means of testing the removal of dead code, except to run the existing suite of test cases:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec spec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Removal of the ''assign_instructor_id'' method can be tested by running test cases for the questionnaires controller, since existing test cases rely on the instructor ID being retrieved correctly:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec spec/controllers/questionnaires_controller_spec.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Testing the method ''create_quiz_question_choice'' can likewise be done with this command. &lt;br /&gt;
The logic associated with getting the instructor ID from a user is tested using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec spec/models/user_spec.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The additions to the questionnaires model can be tested using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec spec/models/questionnaire_spec.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: If you are having difficulties running the ''rspec'' command, try using&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bundle exec rspec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
instead.  This will use the gems specified in ''Gemfile'' that were installed via ''bundle install''.&lt;br /&gt;
&lt;br /&gt;
Also, tests were included for the code movement from the questionnaires controller to the questionnaire model. Checks were being made for database calls in the controller rspec method, the same format was followed while writing tests for the moved methods.&lt;/div&gt;</summary>
		<author><name>Dmbhavsa</name></author>
	</entry>
</feed>