CSC/ECE 517 Fall 2020 - E2079. Improve Search Facility In Expertiza: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 57: Line 57:
This is the sequence diagram for the interaction between instructor and expertiza in the context of advanced search.
This is the sequence diagram for the interaction between instructor and expertiza in the context of advanced search.


[[File:E2079_Search.png|910px]]
[[File:E2079_Search.png|700px|center]]


== ''' Code Changes ''' ==
== ''' Code Changes ''' ==

Revision as of 23:34, 28 October 2020

Introduction

The Expertiza project takes advantage of peer-review among students to allow them to learn from each other. It is an open-source application running on Ruby on Rails. It is used for the 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 that display 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 parameter which includes 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 as yet. This project works on improving the search functionality of Expertiza, by adding search bars if not present, introducing an advanced search feature where user can search on the basis of more than one parameters, and making the search functionality appear more elegant.

Problem Statement

  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 criterion needs to be specified, there should be an 'Advanced Search' button.

Current Implementation

  1. E1987

Proposed Solution

The design proposed in this iteration of the project is not much different from a high level than the design proposed form last year in Fall 2019 Design. Below you will see a copy description of the solution previously proposed and some additional design choices added to improve upon the previous iteration of this issue. Changes from the previous design will be denoted by clear statements indicating the revision.

Four main objects in this application are used as the basis for expanding search functionality. These are the user, assignment, questionnaire, and the review. Each of these points are searchable by the title of the object or not searchable at all. The remaining sections note the current situation and propose a tentative solution. Note the following is a copy of last year's proposal. Reference is listed at the bottom of the page.

Search for User:

In the current system workflow, 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 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.

Search for Assignments:

In the current system implementation, searching via the name of the assignment is supported with a 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, the user can tap on the Advanced Search button available, adjacent to the Search button; a hidden div will then be rendered below-containing text boxes 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. An empty list will be returned if the search criteria don't match any records in the database.

Search for Questionnaires:

The existing system does not have search functionality under Questionnaires. The proposed system will implement 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 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, the user can tap on the Advanced Search button available, adjacent to the Search button; a hidden div will then be rendered below-containing text boxes 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. An empty list will be returned if the search criteria don't match any records in the database. The questionnaires will be grouped on the basis of their courses and will be expanded when clicked.

Search for Reviews:

The existing system does not have search functionality under Reviews. The proposed system will implement search functionality for searching using the attributes like team name, score, reviewer, comment, etc. by entering a partial or a complete text that matches 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.

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.


Flowchart

Below is a flow diagram from last year's iteration that we will aim to follow in our implementation. Reference is listed at the bottom of the page.


Sequence diagram

This is the sequence diagram for the interaction between instructor and expertiza in the context of advanced search.

Code Changes

The code changes will be in the following files

Controllers
app/controllers/users_controller.rb
Models
app/models/assignment_node.rb
app/models/questionnaire_node.rb
app/models/user.rb
Views
app/views/reports/_searchbox.html.erb
app/views/users/_search.html.erb
app/views/users/list.html.erb


Rspec Tests
spec/models/assignment_spec.rb
spec/models/response_spec.rb
spec/models/user_spec.rb

Test Plan

Automated Testing Using RSpec

Automated tests can be written to test the following functionalities:

  1. Given an unfiltered search, results still show
  2. Given a filtered search, the result renders a list of objects containing the filtered search item
  3. Given an invalid search, an empty list returns

rspec tests will be written to cover the depth of each test point above for all four search objects mentioned in the proposed solution.

Manual UI Testing

UI tests will be performed to reproduce the behavior previously mentioned. These steps were reproduced from the previous proposed solution for this issue.

Search for User

  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 Assignment

  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 Questionnaire

  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.

Search for Reviews

  1. Log in to expertiza to view the home page
  2. Go to Manage -> Assignment -> View Reports -> Review Report (View)
  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.

Helpful Links

Identified Issues

Current issues exists in the previous PR for this issue, including build errors in the Travis CI build and various merge conflicts with expertisa's master branch. To avoid running into the same errors, we will not merge this PR's changes into our branch. Instead, we aim to use relevant working code from this project and build upon those changes to develop a clean successful project.

Team Information

  1. Prasanth Yadla (pyadla2)
  2. Josh Beerul (jbeerel)
  3. Li, Junyan (jli56)
  4. Mahajan, Anjaney Chirag (acmahaja)


Mentor: Sanket Pai (sgpai2)
Professor: Dr. Edward F. Gehringer (efg)

References

  1. Fall 2019 Design
  2. Expertiza on GitHub
  3. RSpec Documentation