CSC/ECE 517 Spring 2025 - E2536. Improve assessment360 controller

From Expertiza_Wiki
Jump to navigation Jump to search

Problem Overview

The Assessment360 Controller within the Expertiza platform serves as a key tool for instructors, providing a holistic view of student performance across multiple assessment perspectives. The controller aggregates and displays data from various evaluation components, including teammate reviews, meta-reviews, instructor grades, peer review scores, and assignment submissions. The term Assessment360 reflects its purpose of offering a comprehensive, 360-degree evaluation of a student's performance.

Currently, the system relies on two separate views — all_students_all_reviews and course_student_grade_summary — to display different aspects of student performance. These views present:

  • Project-level data: The projects a student has worked on and the corresponding grades.
  • Peer review data: The scores students receive from their teammates through the teammate review process.

While these views serve important functions, their separation results in a fragmented user experience, as instructors must switch between the views to see a complete set of student performance data. Additionally, the user interface (UI) is not optimized for an intuitive, seamless experience. There are limitations regarding

  • The ability to interact with or customize the data display (e.g., column visibility, sorting, and reordering).
  • The lack of visual clarity in data presentation (e.g., inconsistent formatting and absence of visual grade indicators).
  • Inadequate responsiveness for different device types.

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 and course_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

Controller Structure

The Assessment360Controller is the central controller handling the logic for both the all_students_all_reviews and course_student_grade_summary views. It interacts with various models and services to fetch, process, and deliver the necessary data to the views. The current structure is as follows:

  • The controller is responsible for gathering and processing assessment data such as grades, peer reviews, and meta-reviews for each student.
  • It includes logic for handling class averages, calculating final grades, and determining peer review averages.
  • The current implementation uses direct logic for grade calculations, and all calculations are executed within the controller itself, which could lead to bloated code and reduced maintainability.
  • The views are rendered with minimal controller-side logic, relying on the controller to pass the necessary data to the front-end.

Current Views

The current implementation provides two main views that instructors can use to assess the performance of students. These views are defined in separate HTML ERB files.

all_students_all_reviews.html.erb

This view displays detailed student performance data in a table format. Key features include:

  • Student Information Table: Displays each student’s name, ID, and relevant information.
  • Teammate and Meta-Review Scores: For each student, the table shows the scores received from teammates and meta-reviews, which help in assessing peer evaluations.
  • Class Averages: For each assignment and review type, class averages are calculated and displayed for instructors to analyze the overall performance of the class.
  • Separate Columns for Review Types: Each type of review (teammate, meta-review, etc.) is shown in a separate column, making it easy to compare different assessment categories side by side.

course_student_grade_summary.html.erb

This view focuses on summarizing the project grades and peer review scores for each student. It includes:

  • Student Grades and Peer Review Scores**: Displays the individual project grades and the peer review scores that a student has received.
  • Assignment Topics: Lists the assignment topics associated with each project, along with the grades and peer review scores for those specific topics.
  • Final Grades and Peer Review Averages: The final grade for each student is calculated by considering both the project grade and peer review scores, and the average peer review score is displayed alongside the final grade.
  • Sortable Table Structure: The table in this view is designed to be sortable, allowing instructors to order students by project grades, peer review scores, or any other criterion available in the table. This adds flexibility in how data is analyzed.

Use Case Diagram

For this project our job is to unify the view of the two files, i.e. all_students_all_reviews and course_student_grade_summary, which were created in the previous implementation to one. This would result in a single view which would help in evaluating performances by combining a lot of different perspectives. In our case, if we merge the two files and create a new view, the user should be able to view all the information that is there to be seen in one page. This includes:

  • Viewing a Unified Dashboard
  • Viewing all the Project Grades
  • Viewing Peer Evaluation Scores
  • Selecting and Deselecting Columns

Using this information we have created the following Use Case Diagram:

Improve assessment360

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.

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.

Implementation

Previous View

Previously, the Assessment360 Controllers view relied on two separate views i.e. all_students_all_reviews and course_student_grade_summary, to display different aspects of student performance. This is how they looked like before.

1. all_students_all_reviews.html.erb

2. course_student_grade_summary.html.erb

Current View (after code changes)

The main objective of this project was to enhance the UI/UX and code quality of the assessment360 controller. This involved merging the two existing views (all_students_all_reviews and course_student_grade_summary) into a single unified view.

1. assessment360_controller.rb

2. all_students_all_reviews.html.erb and course_student_grade_summary.html.erb removed

3. course_summary.html.erb added which contains the combined view

2. tree_display.jsx

3. routes.rb

Testing Strategy

Type Description Tests
Unit Tests Test individual controller methods - Test grade calculations
- Test data formatting
Integration Tests Test interactions between components - Test view rendering
- Test database queries
- Test caching functionality
Manual Testing Test UI functionality, performance, and error handling - Test UI functionality
- Test performance with large datasets
- Test error scenarios

Testing Results

Success Criteria

The success of this feature implementation will be evaluated based on the following criteria:

Criterion Description
UI Enhancements Implemented and Working All proposed UI enhancements, including the unified view, column management features, and data presentation improvements, must be fully implemented and functioning as expected. The UI should be intuitive, responsive, and meet the design goals outlined in the document.
Performance Improvements Measurable The feature should demonstrate a measurable improvement in performance, particularly in terms of load times and responsiveness when rendering large datasets or performing grade calculations. Performance benchmarking should indicate a noticeable reduction in latency.
Test Coverage Comprehensive unit and integration tests must cover more than 80% of the new code and critical paths in the controller. This ensures that the feature is reliable, and potential issues are identified early in the development cycle. Test results should be stable, with no significant failures.
Code Documentation Complete All new and modified code must be thoroughly documented. This includes clear inline comments, explanations for complex logic, and appropriate documentation for new functions, classes, and components. This ensures that future developers can understand and maintain the code efficiently.
No Regression Bugs After implementing the new feature, no existing functionality in the Assessment360 controller should break or behave unexpectedly. Regression testing should show that previously working parts of the system continue to function without issues.
Positive User Feedback End-users (instructors and administrators) must provide positive feedback about the usability and effectiveness of the feature. Feedback should indicate that the feature adds value, improves user experience, and meets the goals outlined in the design document.

Implementation Video

Video Link: https://drive.google.com/file/d/1aAzGuSc-qwed4sGMIsWrIgelTTqd_OJ0/view

Youtube Link: https://youtu.be/I3f4sVR_NWg

Team Information

Mentor: Mitesh Anil Agarwal

Team:

  • Jap Ashokbhai Purohit - jpurohi@ncsu.edu
  • Sharmeen Momin - smomin@ncsu.edu
  • Prithish Samanta - psamant2@ncsu.edu

References