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

From Expertiza_Wiki
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. Students can form teams in expertiza to work on an assignment in a group. A student team can submit their work through multiple means such as file uploads and embedded links. Expertiza also consists of questionnaires which can be leveraged for many tasks one of them being peer evaluation of submissions. Students can also review their teammates, making use of the teammate review questionnaire, based on their contribution to the projects.

Problem Definition:

Expertiza rubrics are utilized to build questionnaires and these rubrics incorporate several kinds of items, including Criterion (dropdown + comment), Checkbox, MultipleChoice, and Scale. When we use these questionnaires for reviews, for example the teammate review assessment we encounter a few problems. One “problem” with all of these types is that there is nothing to stop a reviewer (say some student) from assigning the maximum score to all the reviewees (student's teammates). This is indeed a problem for teammate assessment, when the faculty asks for what fraction of the work each teammate did.So an alternative is needed, let’s call it a “Cake” item type, that allows a reviewer to divide a “cake” in any way between the reviewees, but does not allow him/her to divvy up more than 100% of the cake.

  1. When the reviewer submits a score that would bring the total assigned for this item to > 100%, the system needs to warn.
  2. Allow a reviewer to give him/herself a score
  3. Proposed design needs to be compatible with existing self reviews code and teammates reviews
  4. Should be extensible to other kind of reviews apart from teammate reviews as well

For instance, the above figure consists of a team of 4 members, with self included as a team-member when reviewing every member's contribution.
If A has reviewed his other 3 teammates B, C, D with contributions of 15%, 10%, and 45% respectively, he should only be allowed to review self with a contribution of 30% or lesser.

Design

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].

Potential ways of displaying the Cake question on the UI:

  • Stars: Existing design for teammate reviews uses stars to symbolize the contribution provided by each student. We can implement the cake type using the same.

Cons: Stars are not very versatile when there are a greater number of students per team and if the student wants to equally rate their contribution.

  • Drop Down: In order to give the student more flexibility, another way a student can pick the contribution of each team member is using a dropdown of the % values.

Cons: Drop down values need to be restricted to intervals of 5 or more, as the drop down becomes too long to display all values from 0-100.

  • Text box with up-down arrows: Provides utmost flexibility and precision to the student while adding contribution of his team members, we can provide a text box with necessary validations which lets the student provide the contribution % for his teammates as any integral number within the limits.

We decided to implement the text box, looks as follows:


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: 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)

Why we chose this approach:

The initial idea for this project was to make use of the existing feature for self-review, when a team member reviews his/her contribution to the team. But after considering code that also involves teammate reviews, what we have observed is that every assignment has the option to render reports to the instructor - showcasing different types of reports such as Review Reports, Teammate Review Reports, Self Review Reports, Answer Tagging reports. If the existing self-review feature were to be implemented, the view for the Self Review reports would also contain self-teammate reviews, which would cause inconsistencies in rendering Self Review Reports, and does not help serve the purpose of a legible report.

Thus, keeping self-teammate reviews as an instance of TeammateReview would help the instructor in evaluating all the reviews in one go, as the view that gets rendered is shown below:

Here, for simplicity, the assignment - Assignment_Example can have teams with maximum of 2 participants. Consider Student8529, who has reviewed himself and his teammate Student8663. With the design approach taken for this project, when Student8529 reviews himself, the review would appear under the Teammate reviewed, under the Teammate review report. This would certainly help instructors verify reviews in a much simpler manner. The design also ensures minimal code change to existing code.

Use Case Diagram

Actors involved:

  • TA/Instructor: Responsible for making a questionnaire, includes a Cake question, and assigns the questionnaire to the required assignments. S/he also decides on enabling the inclusion of 'Self' for Cake question type contributions. The percentage calculation differs accordingly.
  • Student: Fills out the reviews, and chooses answers in accordance with the Cake question type imposed restrictions, if there is one. In this use case, the ResponseMap thus generated is restricted to TeammateReviewResponse, as Cake question would be used for grading contributions of team members.

Implementation

A new class Cake has been newly introduced as a subclass of ScoredQuestion. The Cake class is a type of question that can be offered as part of any questionnaire, which keeps an account of all the answer values recorded for one specific question. The maximum value that can be given to a question of type cake is 100, and any value entered above 100 is automatically void, setting the answer entered to zero by default. The user is informed of the same and also can keep track of how much of the “cake” has already been taken, which helps him determine the value that he can enter. Upon entering a value greater than 100, a warning is displayed, informing the user that the value has exceeded 100, and setting the value back to 0. A textbox input with up-down arrows is being used, to help the user increment/decrement values as he pleases.

The general makeup in expertiza for different type of questions is that each question has the following methods: edit(_count) View_question_text complete() view_completed_question()

The parameters for the last two methods - complete and view_completed_question vary, depending on the type of question. These methods are responsible for rendering html code onto the view in which they are being referenced. Similarly, the following methods have been added to cake.rb :

edit(_count)

The edit method is called on the initial questionnaire creation, and the view on the browser is as shown below:

The method is invoked from the questionnaire/edit.html.erb file.

View_question_text The following code has been added to this method:

The method is invoked from the view questionnaire option (questionnaire/view.html.erb), on each questionnaire, showing the text for the question, type (being cake) and weight (default 1).

view_completed_question() Snippet of the code is shown below:

The method is called when the user/participant wants to view or review his/her. The screen for the same when a cake type question is added to the teammate review is as shown below:

The cake type question will always have a green circle in the background, rending the score on top of it. The method is called from the response/view.html.erb file.

In order to enable a student to review him/herself as a teammate we have implemented self reviews for teammate assessment. We have incorporated a checkbox in the review strategy tab of creating/ editing an assignment which will allow the instructor to either enable or disable this feature. We added the following code to assignments/edit/_review_strategy.html.erb file as follows:

We also included a warning for the instructor, incase they try to enable self teammate reviews after creating the assignment and after some of the students have given their reviews. Since, enabling this feature would cause inconsistencies in data with respect to cake. For example: In teammate review assessment, let there be a cake type question about the amount of contribution provided by each team member. Previously, the cake should be split between all the other team members apart from the author. After enabling self reviews, cake has to include the author as well. The warning is implemented as follows:

  1. Edited student_teams/view.html.erb to add reviewer to list of displayed teammates and show review link if self review is enabled

Other Changes

  1. Edit questionnaire/_questionnaire.html.erb: Add Cake to the list question types
  2. Edit questionnaires_controller.rb, under “add_new_questions” method, adding a cake type and handle the changes.
  3. Edit response/response.html.erb and add cake type questions to the displayed response.
  4. Edit response/view.html.erb and add cake type questions to the displayed response.

Database Modification

In order to implement the self review feature for teammate reviews we have added a column "is_self_teammate_review_enabled" to the assignments table. Below is the migration for the same:

 class SelfTeammateReview < ActiveRecord::Migration
  def change
	add_column :assignments, :is_self_teammate_review_enabled, :boolean, :default => false
  end
end 

Database Design

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

Relevant Tables


For querying the model to get other answers submitted by a Reviewer for a particular question for his Team, we get the Team ID using his Participant ID for the Assignment. From the Team ID, we get the rest of the Team Users (referred to as Reviewees in the ResponseMaps generated), and then the Reviewer's answers for the other Reviewees.

We restrict the query to not include the current Reviewer-Reviewee combination, as we need to exclude it in case the user is editing his previous submits.

Test Plan:

Test Details:

UI Testing

  • Reviewing teammates (happy case when contribution is < 100%)
  1. A student logs on to expertiza and clicks on an assignment
  2. Then he clicks on your team link
  3. He should be able to see his teammates under team members
  4. Click on review link for a fellow team member
  5. Fill the responses for the given questions (which include cake type questions as well)
  6. Save the review
  • Giving > 100% for cake questions
  1. A student logs on to expertiza and clicks on an assignment
  2. Then he clicks on your team link
  3. He should be able to see his teammates under team members
  4. While reviewing a teammate, a student gives 60% as contribution to teammate1
  5. When he tries to give > 40% for the teammate2. He should see a warning that states that total of the cake is exceeding 100%
  • Context: Self reviews can be enabled/ disabled for an assignment as per the choice of the instructor.
  1. Self reviews enabled
  2. A student logs on to expertiza and clicks on an assignment
  3. Then he clicks on your team link
  4. He should be able to see his teammates and himself (for self review) under team members
  5. Total contribution for a cake type question in a teammate review should include the contribution provided by the student in the self review as well.
  6. If the contribution is exceeded, a warning should appear
  • Self review disabled
  1. The link for a reviewer to review himself as a team member should not show
  2. The cake type questions in the teammate review should include only contributions provided by the other team members
  • Context: If self review is enabled after the assignment has been created and a few students have already given reviews, then it should give a warning.
  1. Self review enabled in the middle of the assignment
  2. Add teammate review for teammate1
  3. Add teammate review for teammate2 (make sure it adds upto 100%)
  4. Enable self review as an instructor
  5. As a student, notice that a new review button is visible in the “your team” page.
  6. Click on review, try to add contribution for self and make sure a warning appears that says that the cake is already at 100%
  • Context: If self review is disabled after the assignment has been created and a few students have already given reviews.
  1. Self review disabled in the middle of the assignment
  2. Enable self review as an instructor
  3. Add teammate review for teammate1
  4. Add teammate review for teammate2
  5. Add self review (make sure it adds upto 100%)
  6. Disable self review as an instructor
  7. As a student, notice that the review button is NOT visible in the “your team” page

Automated testing using Rspec

Both Rspec and Capybara with Rspec tests have been written, with the capybara file - cake_questionnaire.rb added to spec/features folder, and rspec model file - cake_spec.rb added to the spec/models folder. The capybara test creates a new questionnaire by logging into ex[[File:]]pertiza as instructor6, and adds the cake type questions to the questionnaire.

Several other test cases such as successful login into expertiza, along with testing the two main scenarios (shown in the snippet above) had been tested. The question_type is a list of values which contain all types of questions, which includes the question type cake. The test cases pass, on creation of a review questionnaire and on creation of a questionnaire with different types of questions, including the cake type questions to the questionnaire rubric.

The RSpec testing has been done on the cake.rb model, and has resulted in a decent code coverage of 82.73% and sample code can be seen in the snippet below:

With most of the code on the model is rendering html code, the correctness of the html code has been tested, to check if rspec also results in code that is expected. To run and verify Rspec results, please do run the following commands from the expertiza folder:

rspec spec/models/cake_spec.rb rspec spec/features/cake_questionnaire.rb

With the right gems installed, the test cases should ideally pass.

Future Scope:

In the current implementation of cake type questions, answer objects are tracked on the basis of teammate reviews or any other review, meaning, if the cake type question is part of a Teammate Review questionnaire, then instances of answer are tracked with respect to answers given by team members, otherwise all the responses for that specific question are fetched without any correlation between answer instances and team members. Either way, the total should not exceed 100, decided by the client side javascript rendered.

As part of future scope, if there are reviews other than teammate reviews that would need to keep a track of answer objects with respect to team members, then the implementation would have to also include that specific review scenario. Also, currently, answers are not being fetched round wise, since teammate reviews are not accounted for on a round basis. With the current implementation, reviews that track answers round-wise, would not be accommodated with cake type question and can be extended for the same.

The implementation of the above can be found in the get_total_score_for_question method in cake.rb file.

Team

Mentor: Carmen Bentley (cnaiken@ncsu.edu)

  • Mita Gavade (magavade@ncsu.edu)
  • Srujana Rachakonda (srachak@ncsu.edu)
  • Ram Chavali (rlchaval@ncsu.edu)
  • Abhirav Kariya (akariya@ncsu.edu)