CSC/ECE 517 Fall 2022 - E2284. Calibration submissions should be copied along with calibration assignments

From Expertiza_Wiki
Jump to navigation Jump to search

Introduction

A “calibration assignment” is an assignment where the students are asked to review work that has also been reviewed by a member of the course staff. If the student’s review “resembles” the staff member’s review, then the student is presumed to be a competent reviewer. Here is a further description of calibration assignments. The instructor (or TA) adds a few extra participants to the assignment to set up calibration. The instructor (or TA) then impersonates the extra participants and submits work on behalf of each of the extra participants.

Problem Statement

Having the instructor (or TA) impersonate the extra participants, and submit work on behalf of each of the extra participants is extra trouble. It would be nice if an instructor didn’t have to resubmit the same calibration submissions every semester. Copying the extra participants along with their teams, submissions, and responses when copying an assignment makes things much easier.

Previous Submission

What was Done

They created a new class method that checks if the an assignment was calibrated and if it was, it calls methods from models. It performs the following:

  1. They copy all submission records with the assignment_id matching the original assignment.
  2. Copy all participants with the parent_id matching the original assignment ID.
  3. Copy all the teams with a parent_id matching the original assignment ID.
  4. Recreated mappings needed to associate participants with teams and review_response maps.
    1. Their copy methods for teams and participants return hash maps that are used to lookup previous mappings.
    2. Create new TeamsUsers. Associates participants with teams.
      1. Create new ReviewResponseMap. Associates reviewers and reviewees, linked to an assignment, together.
  5. Copy all review_responses, using the original review response map as the reference.

Their 'copy_calibrated_reviews' is called in the existing assignment_form class method 'copy', if the copied assignment is able to be saved (to avoid creating new records).

They also added methods for copy naming schemes so that the assignment model validates uniqueness of both the assignment name and directory_path.

Issues

Issue 1: To set up calibration, the instructor (or TA) adds a few extra participants to the assignment. The instructor (or TA) then impersonates the extra participants, and submits work on behalf of each of the extra participants. -

  • This is extra trouble. An instructor needn't have to resubmit the same calibration submissions every semester.

Issue 2: Not all uses of class methods are good.

  • self.copy_participants_for_assignment: copies old participants to new --> assignment_participant.rb, it is in teams_users.rb, which seems misplaced.

Issue 3: Returns a mapping from the old response map to the new response map.

  • self.copy_review_response_map, returns a mapping from the old response map to the new response map. It is in review_response_map.rb. This can be an instance method. There is a copy_review_responses in this class too.

Issue 4: Code missing without causing a bug

  • Line 65 of submit_hyperlink has missing code.

Issue 5: Old code not reused.

  • New code was written to copy a team in teams_user.rb. There already exists code to copy a team.

Issue 6: No Automated tests written

Files Changed

assignment_form.rb

 Added a new method "copy_name" to name copied assignments. Where they changed the name of the copied assignments to “copy of copy” and "copy of copy of copy", etc to "Copy of <name> <copy number>"
 Added new method for copying objects needed to recreate calibration reviews

participant.rb

 Wrote a "createparticipant" method in assignment_participant in place of a similar method in participant.rb

response.rb

 Implemented a method for copying previous responses 

response_map.rb

 Implemented a method to create ReviewResponse mapping based on mapping of copied assignment

submission_record.rb

 Added method for copying submission records of an assignment


teams_user.rb

 Added a method to create new teams_users so that new participants and teams are associated the same way they were for the previous assignment

assignment_participant.rb

 Added a method for copying extra participants should be here, we wouldn't need to copy participants with type 'CourseParticipant'

Design

Final Implementation

Test Plan

Testing Goals

 The main goal of our testing is to ensure that when a new calibration assignment is added, all of the qualifying previous calibration submissions 
 and reviews are successfully copied over without overwriting any existing submissions.

Automated Testing using Rspec

Context

When the original assignment to be copied is a calibrated assignment

Behaviors to Verify

For the copied assignment, we need to verify if:

1. All the submission records are copied from the old assignment to the new assignment.

2. Extra participants are copied.

3. All review responses are copied.

Conclusion

Team Information

Mentor

Dr. Ed Gehringer (efg@ncsu.edu)

Team Members

Pradyumna Khawas (ppkhawas@ncsu.edu)
Abhimanyu Bellam (abellam2@ncsu.edu)
Vishnu Vinod Erapalli (verapal@ncsu.edu)

Resources