CSC/ECE 517 Spring 2024 - E2415. Reimplement responses controller.rb (Design Document): Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 2: Line 2:


==1.Expertiza==
==1.Expertiza==
The Expertiza project, an open-source endeavor rooted in Ruby on Rails, embarks on continuous improvement to adapt and integrate modern software engineering practices. The Responses Controller is engineered to assist reviewers in submitting structured data that is specifically aligned with an assignment's rubrics, ensuring the provision of relevant questions for each round within the correct due date period. It enables a reviewer to evaluate and score the rubric questions pertinent to the assignment's topics. Furthermore, it ensures the delivery of appropriate questions for each assignment round, allowing reviewers to create and modify scores and comments for each of the rubric questions associated with the assignment. After reviewers submit their scored questions and comments, the Responses Controller dispatches an email notification to the instructor and the reviewed team's members.


==2.Problem Statement==
==2.Problem Statement==

Revision as of 02:42, 8 April 2024

CSC/ECE 517 Spring 2024 - E2415: Reimplementation of responses_controller.rb (Design Document)

1.Expertiza

The Expertiza project, an open-source endeavor rooted in Ruby on Rails, embarks on continuous improvement to adapt and integrate modern software engineering practices. The Responses Controller is engineered to assist reviewers in submitting structured data that is specifically aligned with an assignment's rubrics, ensuring the provision of relevant questions for each round within the correct due date period. It enables a reviewer to evaluate and score the rubric questions pertinent to the assignment's topics. Furthermore, it ensures the delivery of appropriate questions for each assignment round, allowing reviewers to create and modify scores and comments for each of the rubric questions associated with the assignment. After reviewers submit their scored questions and comments, the Responses Controller dispatches an email notification to the instructor and the reviewed team's members.

2.Problem Statement

The ResponseController in Expertiza, a legacy system with conventions predating Rails standards, is overly complex, encompassing functionalities beyond basic CRUD operations and needing adherence to modern Rails naming and design principles. Key issues include the direct implementation of functionalities like sorting reviews and checking reviewer roles within the controller, suggesting a shift towards polymorphism and a more structured approach to code organization. Furthermore, the controller's handling of email notifications and feedback mechanisms is inconsistent, indicating the necessity for a dedicated helper to streamline communication processes. The reimplementation effort must focus on simplifying the controller, adhering to Rails conventions, and improving code readability and maintainability by appropriately distributing responsibilities.

3.Design Goal

4.Class UML Diagram

5. Implementation

5.1 Model

Methods within the model were refactored or introduced, including:

  • 5.1.1 set_content
  • 5.1.2 validate_params
  • 5.1.3 serialize_response

5.2 Controller

Controller methods for CRUD operations were enhanced, comprising:

  • 5.2.1 Create
  • 5.2.2 Show
  • 5.2.3 Update
  • 5.2.4 Delete

6. Files Modified/Added

List of primary files modified or created includes:

  • responses_controller.rb
  • response_helper.rb
  • response.rb


7. Test Plan

Testing model methods

Test Coverage

8. Team

8.1 Mentor
  • Ameya Vaichalkar
8.2 Members
  • Jeff Riehle
  • Maday Moya
  • Jacob Leavitt

9. Links

Swagger Video Link:

Pull request:

Model Tests Video:

Controller Tests Video:

References