CSC/ECE 517 Fall 2019 - E1987. Improving search facility in Expertiza
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 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.
Problem Definition:
- An instructor or administrator can search for a user by name, user-ID, or other characteristics.
- An instructor should be able to search for assignments by name, due date, or other characteristics.
- 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.
- 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.
- One should also be able to search for questionnaires by words used in questions that belong to the questionnaires.
- 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.
- An instructor or administrator should be able to search for all the assignments that a particular user has participated in.
- If more than one criteria needs to be specified, there should be an 'Advanced Search' button.
Proposed Solution:
Use Case Diagram
Proposed Code Changes
Database Design
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 )
- Search by user name
- Search by user name that does not exist
- Search by user email
- Search by user email that does not exist
- Search by user email containing a substring
- Search by user full name
- Search by user full name is empty
- Search by user name and email