CSC/ECE 517 Fall 2019 - E1992. Add cake type to rubrics design

From Expertiza_Wiki
Revision as of 01:31, 12 November 2019 by Akariya (talk | contribs)
Jump to navigation Jump to search

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 as yet. 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:

Proposed Solution:

The issue asks us to have a Cake type for the question taking in a participant’s contribution, whenever s/he is reviewing the other teammates. We add in a new Question type ‘Cake’, which will be extended from the Scored Question model [cake < scored question < choice question < question]. We intend to keep the Cake type input in the form of the number of stars, on the lines of the existing code.

Addressing self-reviews for Cake Type:

The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. The point whether the distribution of the cake should include the reviewer himself, is addressed on the basis of the enabling of ‘Self-Review’. If enabled, we include the self contribution to sum it up to one unit (for instance, five stars.) If not, we exclude the reviewer.

There are two ways to integrate the Cake type to the existing flow:

  • Solution A: Self-review at team level as an instance of TeammateReviewResponseMap

In the current system workflow, we found that the teammate reviews are taken as instances of TeammateReviewResponseMap. The questionnaire for reviewing teammates includes the question asking the cake (contribution) factor. Ideally, the cake should include the reviewer himself as well.

Currently, whenever a participant is reviewing his teammates, s/he is displayed a page with his current teammates, and this page excludes the logged in user. We include the logged in user ID as well by removing this check, and let him submit his self-review with the same questionnaire as his other teammates have.

The Teammate Review page would be displayed as:

Steps to reproduce the proposed workflow:

  1. Log in to expertiza to view the home page
  2. Login as an Instructor, and then impersonate a student or login as a Student
  3. Go to Assignments -> Your team
  4. You will see a list of your teammates, including self: Choose a member and click on ‘View’
  5. You can see the question for asking the contribution as a cake type
  6. There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)


  • Solution B: Self-review at team level as an instance of SelfReviewResponseMap

Currently, we have self reviews in place at an assignment level. This means that a team can review their own work, similar to how they review their peers. We want to extend the self review functionality to not only review the project but to also review the student as a team member. We can make use of the existing self review code and extend it to teammate reviews as well.

In the current implementation, a student can perform a self review by going to a particular assignment and clicking on the “Your work” link. If self reviews are enabled for that assignment, then a button will show at the bottom of the page which says “Self review”. Clicking on the button will show a link “Begin”

We want to add another link here, that says “self teammate review”. Such that clicking on the link will render the same questionnaire that is shown for the student to review other teammates.

Steps to reproduce the proposed workflow:

  1. Log in to expertiza to view the home page
  2. Login as an Instructor, and then impersonate a student or login as a Student
  3. Go to Assignments -> Your work
  4. Click on self review button at the bottom of the page
  5. You will see a new “self teammate review” link here
  6. Clicking on the button will render the questionnaire
  7. You can see the question for asking the contribution as a cake type
  8. There will be a text description next to it denoting what part of the cake is taken (what contribution factor of the work is used)

Final approach: We decide to go with the proposed Solution A (Self-review at team level as an instance of TeammateReviewResponseMap), since it ensures consistency in the flow, while taking teammate reviews and self-reviews.

Use Case Diagram

Proposed Code Changes

  1. Proposed Code Changes
  2. Edit questionnaire/_questionnaire.html.erb: Add Cake to the list question types
  3. Create cake.rb model that inherits from ScoredQuestion model. Add method to calculate currently added weights of the cake to this model.
  4. Edit questionnaires_controller.rb, under “add_new_questions” method, adding a cake type and handle the changes.
  5. Edit assignments/edit/_review_strategy.html.erb and add ‘Allow teammate self-review’ to the list of options.
  6. Edit student_teams/view and add reviewer to list of displayed teammates and mark that item as self review in the view.
  7. Edit response/response.html.erb and add cake type questions to the displayed response.
  8. Edit response/view.html.erb and add cake type questions to the displayed response.


Database Design

Below is the simplified version of the ER diagram which displays the relationships between the entity sets.


Relevant Tables

Test Plan:

Automated Tests

Automated tests in RSpec will be added as we implement the search functionality for each modified file. Most of the tests added will be unit tests that cover the use cases for each flow and changes made in the model as per the requirement description.

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


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


Manual Tests

Search for User
  1. Setup: create a user with name="student" and userId="5000"
  2. Action: Instructor clicks on manage - > users -> in textbox enters name="student"
  3. Response: Relevant details of student, name="student" is displayed


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


Search for Assignments
  1. Setup create an assignment with name="assignment" and set a due date
  2. Action : Instructor clicks on Manage -> Assignments, in textbox enter "assignment" in relevant tab
  3. Response : Relevant assignment should be displayed


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


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


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


Search for Reviews
  1. Setup : Setup review for an assignment, login as student and then add review
  2. Action : Log in as instructor, Manage -> Assignments, Click on Review Report icon on corresponding assignment
  3. Result : Review should be seen


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