CSC/ECE 517 Fall 2019 - E1987. Improving search facility in Expertiza: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 43: Line 43:
:#Log in to expertiza to view the home page
:#Log in to expertiza to view the home page
:#Go to Manage > Assignments
:#Go to Manage > Assignments
:#Type the search criteria in the available search criteria and select the appropriate field from the dropdown.
:#To perform search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing textboxes for all the columns, allowing the user to search based on multiple columns.
:#All the entries that match the given criteria will be returned.
:#An empty list is returned if the search criteria doesn't match any valid records in the database.
===Search for Questionnaires:===
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 questions within a questionnaire, date of creation, and date updated by entering a partial or a complete text that matches with the particular field. We will also allow searching for fields irrespective of the case of the searched string. The user will be able to apply multiple filters at a time and the output of the query will match all the filters applied. If no results are found, an empty list will be returned.
To search for an assignment by Creation Date, the user will be prompted with a calendar where he can select a date and all the assignments created on or before the selected date will be displayed.
To apply multiple filters, user can tap on the Advanced Search button available, adjacent to the Search button; a hidden div will then be rendered below containing textboxes for all the columns. All assignments that were created before the selected date for Creation Date or Updated Date columns and the ones that match other filters will be returned. A empty list will be returned if the search criteria doesn't match any records in the database. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.
Steps to reproduce the proposed workflow:
:#Log in to expertiza to view the home page
:#Go to Manage > Questionnaires
:#Type the search criteria in the available search criteria and select the appropriate field from the dropdown.
:#Type the search criteria in the available search criteria and select the appropriate field from the dropdown.
:#To perform search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing textboxes for all the columns, allowing the user to search based on multiple columns.
:#To perform search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing textboxes for all the columns, allowing the user to search based on multiple columns.

Revision as of 02:54, 11 November 2019

Introduction:

Expertiza is an open source application running on Ruby on Rails. It is used for management of courses and the assignments for respective courses, by the faculties and the students. The manage content section of the application has different views which displays information about the users, courses, assignments, questionnaires and reviews. The application should have a fully functional search functionality throughout the views, so that a user can search any type of data with ease, on the basis of any number of parameters depending on his requirements. Users should be searched on the basis of one more parameters which include name, full name, email, etc. Similarly, assignments should be searched on the basis of name, created date, updated date, etc. However, the search functionality in the existing application is constrained to just a single parameter for users and assignments. Questionnaires management does not have a search functionality implemented. This project works on improving the search functionality of expertiza, by adding search bars if not present, introducing advanced search feature where user can search on the basis of more than one parameters and making the search functionality appear more elegant.

Problem Definition:

  1. An instructor or administrator can search for a user by name, user-ID, or other characteristics.
  2. An instructor should be able to search for assignments by name, due date, or other characteristics.
  3. 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.
    1. 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.
    2. One should also be able to search for questionnaires by words used in questions that belong to the questionnaires.
  4. 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.
  5. An instructor or administrator should be able to search for all the assignments that a particular user has participated in.
  6. If more than one criteria needs to be specified, there should be an 'Advanced Search' button.

Proposed Solution:

Use Case Diagram

Proposed Code Changes

Search for User:

In the current system workflow, we found that the user is unable to search in the Manage Users view. In the proposed workflow, we plan to enable the user to search by all the columns in the UI viz. Name, Full name, Email Address, Role, Parent by entering a partial or a complete text that matches with the particular field. We will also allow searching for fields irrespective of the case of the searched string. The user will be able to apply multiple filters at a time and the output of the query will match all filters applied. If no results are found, an empty list will be returned.

Steps to reproduce the proposed workflow:

  1. Log in to expertiza to view the home page
  2. Go to Manage > Users
  3. Type the search string in the search box available on the UI and select the column to search for from the dropdown.
  4. To perform search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing textboxes for all the columns, allowing the user to search based on multiple columns.
  5. All the entries that match the specified criteria will be returned.
  6. An empty list is returned if the search criteria doesn't match any valid records in the database.

Search for Assignments:

In the current system implementation, searching via the name of the assignment is supported with partial or complete assignment name. However, the search is case sensitive. In the proposed system, the user will be able to search for an assignment using additional filters such as Creation Date and Updated Date along with Assignment Name. The user will also be able to apply multiple filters at a time and the output of the query will match all filters applied. If no results are found, an empty list will be returned.

To search for an assignment by Creation Date, the user will be prompted with a calendar where he can select a date and all the assignments created on or before the selected date will be displayed.

To apply multiple filters, user can tap on the Advanced Search button available, adjacent to the Search button; a hidden div will then be rendered below containing textboxes for all the columns. All assignments that were created before the selected date for Creation Date or Updated Date columns and the ones that match other filters will be returned. A empty list will be returned if the search criteria doesn't match any records in the database.

Steps to reproduce the proposed workflow:

  1. Log in to expertiza to view the home page
  2. Go to Manage > Assignments
  3. Type the search criteria in the available search criteria and select the appropriate field from the dropdown.
  4. To perform search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing textboxes for all the columns, allowing the user to search based on multiple columns.
  5. All the entries that match the given criteria will be returned.
  6. An empty list is returned if the search criteria doesn't match any valid records in the database.

Search for Questionnaires:

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 questions within a questionnaire, date of creation, and date updated by entering a partial or a complete text that matches with the particular field. We will also allow searching for fields irrespective of the case of the searched string. The user will be able to apply multiple filters at a time and the output of the query will match all the filters applied. If no results are found, an empty list will be returned.

To search for an assignment by Creation Date, the user will be prompted with a calendar where he can select a date and all the assignments created on or before the selected date will be displayed.

To apply multiple filters, user can tap on the Advanced Search button available, adjacent to the Search button; a hidden div will then be rendered below containing textboxes for all the columns. All assignments that were created before the selected date for Creation Date or Updated Date columns and the ones that match other filters will be returned. A empty list will be returned if the search criteria doesn't match any records in the database. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.

Steps to reproduce the proposed workflow:

  1. Log in to expertiza to view the home page
  2. Go to Manage > Questionnaires
  3. Type the search criteria in the available search criteria and select the appropriate field from the dropdown.
  4. To perform search based on multiple filters, the user can tap on the Advanced Search button adjacent to the Search button, the view renders a hidden div containing textboxes for all the columns, allowing the user to search based on multiple columns.
  5. All the entries that match the given criteria will be returned.
  6. An empty list is returned if the search criteria doesn't match any valid records in the database.

Database Design

Below is the simplified version of the ER diagram which displays the relationships between the entity sets. Team_users and assignment_questionnaires are many to many relationships which are implemented in table format as show below.


Relevant Tables



Test Plan:

We plan to two types of testing

UI Tests

Search for User

Setup: create a user with name="student" and userId="5000"

Action: Instructor clicks on manage - > users -> in textbox enters name="student"
Response: Relevant details of student, name="student" is displayed

Action: Instructor clicks on manage - > users -> advanced search->clicks on checkbox student id and enters "5000" and click "ok"
Response: Relevant details of student, name="student" is displayed

Search for Assignments

Setup create an assignment with name="assignment" and set a due date

Action : Instructor clicks on Manage -> Assignments, in textbox enter "assignment" in relevant tab
Response : Relevant assignment should be displayed

Action : Instructor clicks on Manage -> Assignments-> drop down and apply filters for due date and enter date and click "ok"
Response : Relevant assignments should be displayed

Search for Questionnaires

Setup : Create a Questionnaire, add questions to it
Action : Log in as instructor, Manage -> Questionnaires, in text box enter text
Response : Questionnaires matching text are shown

Action : Log in as instructor, Manage -> Questionnaires, click advanced search and check creation date and enter value
Response : Questionnaires matching text are shown

Search for Reviews

Setup : Setup review for an assignment, login as student and then add review

Action : Log in as instructor, Manage -> Assignments, Click on Review Report icon on corresponding assignment
Result : Review should be seen

Action : Click Advanced search, check review by text and enter text
Result : Matching review should be visible

Automated Tests

Automated tests in RSpec will be added as we implement the search functionality for each Model
Most tests added will be unit tests that cover the test cases for each flow and changes in the model.
Test Details

  • User Model ( spec/models/user_spec.rb )
  1. Search by user name
  2. Search by user name that does not exist
  3. Search by user email
  4. Search by user email that does not exist
  5. Search by user email containing a substring
  6. Search by user full name
  7. Search by user full name is empty
  8. Search by user name and email
  9. Search for assignments participated in.


  • Assignment Model ( spec/models/assignment_spec.rb )
  1. Search by user name
  2. Search by institution
  3. Search by creation date
  4. Search by updated date


  • Rubrics
  1. Search by name
  2. Search by courses used in
  3. Search by assignments used in


  • Reviews
  1. Search all reviews of a particular team’s work for particular scores or text strings.
  2. Search by score
  3. Search by text comment length
  4. Search by reviewer and reviewee