CSC/ECE 517 Fall 2019 - E1982. Regulate changing of rubrics while projects are in progress

From Expertiza_Wiki
Jump to navigation Jump to search

The goal to this project:

1.When a rubric is replaced or the items/questions attached to it are changed, all the active students’ responses object to that rubric will be deleted are created again, that means students need to redo the reviews if they have already done.

2.The system will email the students who have done reviews to notify a redo request after deleting the response object and all associated answer objects.

3.The “active” in the first goal means the replacement action happened during the task duration and the student responses have done in the task duration before the replacing rubric action. For example, a rubric starts from Sep.9th and ends at Sep.13th. An instructor replaces the rubric on Sep.12th, when 60 of 100 students have already finished their reviews. Then the response objects will be deleted and re-created to be new objects in the system, and students need to redo their reviews based on the new rubric.

4.Write comprehensive tests for the above implementation to confidently prove they are correct.

Project Description

Current version:

The function classification change as two kinds: Minor change & Major change.

Minor Change defined as the change makes no difference to reviewings so that we could also use reviewing before change made.(e.g. Delete questions or clarify the statement). And Major change would modify or add some new questions which can’t be found in previous rubric. In such situations, system would delete all related reviewing records and email those reviewers to redone reviewing.


Predict version:

For Minor changes, we still make no movement to database since it makes no effect on scoring process. But Major changes have to be made further development as concerning about Time.

Time_1: Changes should be determined if it is changed in duration, when some students have started and the others not. If change isn’t made in this period it would have no effect.

Time_2: When changes are made at reviewing period, we should make a further consideration about record in DB. The records which were made in this period should be deleted but records in previous semesters are supposed to maintain.

Design Diagrams

The main goal of the code is to edit the rubric. There are 3 types of action: edit, add, and delete questions. We classify these actions into two types: major change and minor change.

Note: Editing questions refers to editing only the text of the questions. Changing the type (multiple-choice, simple-text...) of a question is not allowed in Expertiza. You have to delete the old question and add a new one.

Minor change: Edit questions. In this case, we simply update the text of the questions. There’s no other actions needed.

Major change: Add/Delete questions. In this case, we have to check if there are any reviews done by students in the active period, i.e. the period of time when students can submit reviews. If there are any, we have to notify the affected students by email asking them to re-submit a review using the updated rubric, and delete their old reviews.

Proposed Solution

The solution has five parts:

Check the changes made by instructor. Major or minor?

Check if the change to the rubric is made during the task duration (or if there is any active response?).

Process updates when a major change is made.

E- mail notification is sent to request students to redo their reviews.

Test the implementation thoroughly.


Check if the change to the rubric is made during the task duration

After a change is made, the system will check if the date is during the task duration to determine whether it needs to update existing response objects. The function method will get params as the start time and expire time of the target rubric to proceed a checking. If the change is not during an active task duration, then nothing further needs to be done. If the change is during an active task duration, then the system will do the following work.


Check the changes made by instructor. Major or minor?

Changes are categorized to be major or minor. Minor changes affects only the wording of a particular rubric item. In this case, no action is necessary. Major changes involves rubric replacing and changing items/questions. In this case, all the reviews that have been done need to be redone. To tell a major change, the params passed to the controller includes a tag/identifier that indicates if a new question was added, hence a major change.


Process updates when a major change is made.

If the previous process returns that a major change has been made, the system deletes existing response objects and re-creates new updated object in database when a student press on “review”. As for minor changes, updates affects only the objects that created after the change.


E- mail notification is sent to request students to redo their reviews.

Once controller notice instructor makes a major change of the rubric, and some students have begun the peer review, email notification module is initiated. In this circumstance, the system will generate ActiveRecord and send it to those students. (Their email address could be found in user’s table.) After email successfully sent, record of this student in this assignment and period will be deleted from the database. When students receive the email and update their review, the questions now correspond to the new rubric. And students can see all the details of the old questionnaire in the email, so they won’t have to rewrite the same questions’ answer.


Test the implementation thoroughly.

Our test is designed to three parts: common cases, invalid cases and extreme cases. Details of test plan are included in the Test Plan section below.

Code Change

Test Plan

Each component of the system is tested in a dedicated test file in the spec directory, and the test file name is according to the function tested. Our unit test is accomplished in questionnaires_controller_spec.rb. We should test each (reasonable) method of the controller with at least the following scenarios:


● Common Cases If the instructor only edit a particular rubric item (e.g. to clarify the statement), no action is necessary. If the instructor only delete a particular rubric item (e.g. to delete one of the peer review's criteria), no action is necessary. If the instructor add a particular rubric item (e.g. to add a peer review's criteria) in the student peer review period, the controller should then email the previously done reviews to the reviewer and delete the response object and all associated answer objects. (However, the response_map should not be changed.)


● Invalid Cases If the instructor add a particular rubric item (e.g. to add a peer review's criteria) out of the student peer review period, no action is necessary.


● Extreme Cases If the instructor change the whole rubric (e.g. to delete the old rubic, create a new rubic and assign it to this assignment) in the student peer review period, the controller should then email the previously done reviews to the reviewer and delete the response object and all associated answer objects. (The response_map should be changed since the id of rubric change.)