CSC/ECE 517 Spring 2023 - E2338. Reimplement the response map hierarchy

From Expertiza_Wiki
Jump to navigation Jump to search

Introduction

Expertiza Background

When someone writes a review in Expertiza, they are creating an instance of the Response class. Each Response is created based on a particular ResponseMap. The ResponseMap tells who the reviewer is (the reviewer_id), who the reviewee is (the reviewee_id), and what is being reviewed (the reviewed_object_id).

  • The reviewer_id is normally a record in the Participants table, which specifies an AssignmentParticipant. However, if teams rather than individuals are doing reviews for this assignment, it may be an AssignmentTeam.
  • For reviews of student work, the reviewee_id is always an AssignmentTeam. (If an assignment is set up so individuals rather than teams submit work, the reviewee will still be a 1-member AssignmentTeam.)
  • For teammate reviews, the reviewee_id is always an AssignmentParticipant.
  • The reviewed_object_id is normally an Assignment. But in the case of meta-reviews, the reviewed_object_id is another ResponseMap (because it is a review that is being reviewed).

Problem Statement

We are refactoring the code which are being implemented previously for Re-implementation of response map hierarchy (E2314[[1]]). Some of the changes which are being pointed out till now are as follows-

  • In the previous re-implementation, some of the methods are defined in class level which can be modified to instance level methods for better functionality and adhering to the Object Oriented Design principles.
  • Few of the methods are also present in the existing project which should be implemented in other classes according to their functionality and for increasing coherency of the classes.
  • Some of the methods also needs to be renamed in this refactoring process for better understanding of the developers who will be working on the project later on.

Implementation

Flowchart

Refactoring

Refactoring method

Function placed in the view as partials

Testing

RSpec Testing

Manual Testing

Design Pattern

References

Team Members