CSC/ECE 517 Spring 2024 - E2414 Grading Audit Trail: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 14: Line 14:
== Creating GradingHistoriesController ==
== Creating GradingHistoriesController ==


[[File:GradingHistoriesControllers.png|1000px]]
[[File:GradingHistories Controllers.png|1000px]]


The review_grading_history.rb in Ruby on Rails is designed to manage and display the grading history for assignments within an educational application. It leverages Rails' MVC architecture, utilizing callbacks for pre-action setup, concerns for authorization logic, and ActiveRecord for database interactions. The controller contains methods to check user permissions, differentiate grading histories based on whether they're for submissions or reviews, and list all related grading history entries in reverse chronological order. The authorization logic is particularly detailed, allowing access to different users based on their roles (such as admin, instructor, or TA) and their relationship to the assignment or course. Through the use of parameter handling, conditional logic, and efficient database queries, the controller effectively serves its purpose within the application, showcasing best practices in Ruby on Rails development.
The review_grading_history.rb in Ruby on Rails is designed to manage and display the grading history for assignments within an educational application. It leverages Rails' MVC architecture, utilizing callbacks for pre-action setup, concerns for authorization logic, and ActiveRecord for database interactions. The controller contains methods to check user permissions, differentiate grading histories based on whether they're for submissions or reviews, and list all related grading history entries in reverse chronological order. The authorization logic is particularly detailed, allowing access to different users based on their roles (such as admin, instructor, or TA) and their relationship to the assignment or course. Through the use of parameter handling, conditional logic, and efficient database queries, the controller effectively serves its purpose within the application, showcasing best practices in Ruby on Rails development.

Revision as of 17:15, 24 March 2024

Problem Statement

NC State faculty members and students use Expertiza Open-Source Website to submit assignments, grade them, form teams, and among other features. The main problem statement for project E2414 is that there is no traceability on who was the instructor that assigned or edited a grade of a submission.

Program Objectives

Grading Audit Trail must be implemented with the following information to be stored:

1. When an instructor assigns a grade, there needs to be an indication of who did it and when it was done.

2. Comments previously provided by other instructors must also be preserved.

This information needs to be stored every time an instructor edits a grade / comments and clicks the save button. The grading audit trail can probably pattern off the submission records history on Expertiza. The submission record page can be reached by logging in as instructor -> Manage -> Assignments -> View Submissions -> History. At the minimum, a grading log entry must include the instructor id, assignment id, student id, grade comment and timestamp.

Implementation

Creating GradingHistoriesController

The review_grading_history.rb in Ruby on Rails is designed to manage and display the grading history for assignments within an educational application. It leverages Rails' MVC architecture, utilizing callbacks for pre-action setup, concerns for authorization logic, and ActiveRecord for database interactions. The controller contains methods to check user permissions, differentiate grading histories based on whether they're for submissions or reviews, and list all related grading history entries in reverse chronological order. The authorization logic is particularly detailed, allowing access to different users based on their roles (such as admin, instructor, or TA) and their relationship to the assignment or course. Through the use of parameter handling, conditional logic, and efficient database queries, the controller effectively serves its purpose within the application, showcasing best practices in Ruby on Rails development.

Creating Model GradingHistory

The grading_history.rb model acts as a foundational component within the audit system, linking grading records to specific instructors and assignments through belongs_to associations, thus facilitating the tracking and historical analysis of grading actions in the educational platform.

Creating Model ReviewGradingHistory

The review_grading_history.rb model, inheriting from the controller, is tailored for peer review grading events, featuring protection against mass-assignment vulnerabilities and establishing a relationship with the Participant class to track review grades within the system.

Creating Model SubmissionGradingHistory

The submission_grading_history.rb model extends the controller to focus on submission-related grading records, leveraging attr_protected to enhance security and associating with the Team class to directly relate grades to submitting teams within the platform.

Creating View grading_histories

In the view for grading_histories, the _form.html employs a form builder to neatly handle both the creation and updating of grading history entries. The form is designed to alert users to any validation errors by enumerating them clearly at the top of the form, and it also provides immediate feedback. Once all validation requirements are satisfied, the form offers a straightforward 'Save' submission button, making the process of recording grading actions intuitive and efficient.

The index.html view for grading_histories displays a detailed grade history in a tabular format. It dynamically generates the table header and populates rows with grading records, including the instructor's name, the grade awarded, any associated comments, and the timestamp of when the grade was recorded. Conditional logic makes sure the relevant information is retrieved and displayed whether it’s the name of a team for a submission or a user for a review. This view provides a clear and comprehensive snapshot of the grading timeline, allowing for easy reference and oversight of the grading process for both submissions and reviews within the educational platform.