CSC/ECE 517 Spring 2025 - E2536. Improve assessment360 controller
Project Overview
Project Title: Improve assessment360 Controller
Objective
The primary goal is to enhance the UI/UX and code quality of the assessment360
controller. This involves:
- Merging the two existing views (
all_students_all_reviews
andcourse_student_grade_summary
) into a single unified view. - Improving the presentation and clarity of data (student grades, peer reviews).
- Refactoring logic for better separation of concerns and maintainability.
- Implementing feedback from the previous team.
Current Implementation Summary
The assessment360
controller exposes two main methods:
all_students_all_reviews
: Displays peer review scores per student.course_student_grade_summary
: Displays projects and grades for each student.
Limitations noted in previous feedback:
- Separate views instead of a unified dashboard.
- Excessive decimal precision in grade averages.
- Some layout/design issues (e.g., narrow name column).
- Business logic within controllers (should be moved to mixins).
- Sparse code comments.
Design Pattern Usage in Assessment360Controller
The Assessment360Controller implements multiple design patterns that improve clarity, modularity, and maintainability of the code.
1. Facade Pattern
The controller acts as a facade, hiding complex interactions between various models (Course, Assignment, Participant, Team, etc.) and exposing a simplified interface for the view. It aggregates data like grades, reviews, and penalties and prepares it in a structured format, simplifying the presentation layer.
2. Strategy Pattern
The use of helper modules such as:
- GradesHelper
- AuthorizationHelper
- Scoring
- PenaltyHelper
follows the Strategy Pattern. Each module encapsulates a specific piece of functionality, and the controller delegates responsibility to these interchangeable strategies, promoting clean separation of concerns and easier testing.
3. Template Method Pattern
The method action_allowed? is a hook method that overrides a predefined template method in ApplicationController. This allows customized access control behavior while maintaining a consistent interface across all controllers — an example of the Template Method Pattern in action.
4. Separation of Concerns
Responsibility is split between:
- Controller: Orchestrates data flow
- Models: Store and retrieve business data
- Helpers: Encapsulate computation and utility logic
- Views: Render formatted output
This adheres to the Separation of Concerns principle and keeps each layer clean and testable.
These design patterns contribute to the robustness and scalability of the 360-degree assessment feature, allowing future teams to maintain and extend it with ease.
Planned Enhancements
Functional Changes
Feature | Description |
---|---|
Unified View | Combine both views into a single HTML page that includes both project grades and review scores. |
Column Selection | Allow users to toggle visible columns using checkboxes. |
Exclude Unreviewed Assignments | Retain the functionality to exclude unreviewed assignments from averages. |
Averages Precision | Limit decimal precision to 2 points for clarity. |
Wider Name Column | Adjust layout to prioritize readability (e.g., wider name column than username). |
Code Refactor
Task | Reason |
---|---|
Move averaging logic to mixins or model concerns | Improve separation of concerns and reusability. |
Commenting | Add meaningful comments for helper methods and business logic. |
Query Optimization | Utilize the bullet gem to prevent N+1 queries where applicable.
|
UI/UX Design
The new unified view will feature:
- A tabular layout showing all relevant data.
- Sectioned headers for each student.
- Collapsible panels (if needed) for clarity.
- Visual cues for peer review vs. project grades.
- Responsive design for usability across devices.
Testing Plan
Test Type | Details |
---|---|
Unit Tests | For mixin methods and average calculations. |
Functional Tests | Using RSpec + Capybara to validate UI behavior. |
Manual Testing | Validate layout, toggle functionality, and performance. |
Metrics for Success
- Unified view is fully integrated and intuitive.
- UI loads efficiently and scales with data.
- Code coverage is maintained or improved.
- Previous feedback points are addressed.
- PR receives clean review with minimal rework.
Team Information
Mentor: Mitesh Anil Agarwal
Team:
- Jap Ashokbhai Purohit - smomin@ncsu.edu
- Sharmeen Momin - smomin@ncsu.edu
- Prithish Samanta - psamant2@ncsu.edu