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 45: Line 45:


The index.html view for grading_histories has been created to enhance performance and readability. It presents a grade history in a striped table format, centered around a dynamic header that adapts to display grading information pertinent to submissions or reviews. The created and refactored code uses conditional logic to efficiently handle potential nil records, ensuring that the display adapts gracefully in the absence of grading data. When available, the table populates with comprehensive details such as the instructor's full name, grade, comments, and the precise timestamp of grading—presented in an orderly fashion.
The index.html view for grading_histories has been created to enhance performance and readability. It presents a grade history in a striped table format, centered around a dynamic header that adapts to display grading information pertinent to submissions or reviews. The created and refactored code uses conditional logic to efficiently handle potential nil records, ensuring that the display adapts gracefully in the absence of grading data. When available, the table populates with comprehensive details such as the instructor's full name, grade, comments, and the precise timestamp of grading—presented in an orderly fashion.
== Creating Spec Feature GradeHistories ==
[[File:GradeHistoriesSpec.png|800px]]
Our feature spec grade_histories_spec.rb employs the GradeHistoriesHelperSpec module to ensure that the grading audit trail behaves as intended. The spec is structured to set up the testing environment with assignment_setup and make_submission before each test case. In the first scenario, the spec verifies the visibility of the grade history for a given submission, simulating an instructor's interaction with the grading interface. It tests the workflow of assigning a grade and commenting on a submission, and then it ensures that these details appear correctly on the grading history page. The second scenario checks that the grade history entries are presented in reverse chronological order. It mimics the instructor grading a submission twice, adding comments each time. After saving these grades, the spec confirms that the most recent comment appears first on the grading history page. By using capybara's page and table methods, the spec can navigate through the web pages and verify the content and order of the grading entries on the page. These tests collectively ensure that the grade audit trail feature is not only functioning correctly but also displaying the grading information in an orderly and expected manner, which is crucial for maintaining transparency and accountability in the grading process.

Revision as of 17:58, 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 grading_histories_controller.rb functionality created on Ruby on Rails application serves as a critical component for managing and displaying the grading history of reviews in an educational setting. Rails ensures the integration with the model and view layers, facilitating a robust and intuitive interface for users to interact with grading data. Through the implementation of callbacks for pre-action configurations and the inclusion of authorization logic via concerns, the application effectively enforces security and role-based access control. This ensures that only authorized users such as administrators, instructors, and teaching assistants can access sensitive grading information based on their association with specific courses or assignments. The controller is adept at handling various user permissions, distinguishing between submission and review grading histories, and organizing all related entries in a user friendly manner by displaying them in reverse chronological order. This organization enhances the application's usability by allowing users to easily navigate through the grading history.

Creating Model GradingHistory

The grading_history.rb model,has been created and enhanced with a refactoring that introduces a class method assignment_for_history. This method significantly extends the model's functionality by determining the context of grading—whether it pertains to a submission or a review based on the type of grading activity. For submissions, it identifies the associated AssignmentTeam using the graded_member_id to retrieve the corresponding assignment. In the case of reviews, it uses the participant_id to find the specific AssignmentParticipant, facilitating a direct link to the reviewed assignment or activity through the ReviewGrade model. This addition underscores the model's pivotal role in not only linking grading records to instructors and assignments via belongs_to associations but also in dynamically determining the relevant assignment context based on grading type. This enhancement bolsters the model's capacity to provide a comprehensive and nuanced tracking mechanism, offering deeper insights into the historical analysis of grading actions across the 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 has been created to enhance performance and readability. It presents a grade history in a striped table format, centered around a dynamic header that adapts to display grading information pertinent to submissions or reviews. The created and refactored code uses conditional logic to efficiently handle potential nil records, ensuring that the display adapts gracefully in the absence of grading data. When available, the table populates with comprehensive details such as the instructor's full name, grade, comments, and the precise timestamp of grading—presented in an orderly fashion.

Creating Spec Feature GradeHistories

Our feature spec grade_histories_spec.rb employs the GradeHistoriesHelperSpec module to ensure that the grading audit trail behaves as intended. The spec is structured to set up the testing environment with assignment_setup and make_submission before each test case. In the first scenario, the spec verifies the visibility of the grade history for a given submission, simulating an instructor's interaction with the grading interface. It tests the workflow of assigning a grade and commenting on a submission, and then it ensures that these details appear correctly on the grading history page. The second scenario checks that the grade history entries are presented in reverse chronological order. It mimics the instructor grading a submission twice, adding comments each time. After saving these grades, the spec confirms that the most recent comment appears first on the grading history page. By using capybara's page and table methods, the spec can navigate through the web pages and verify the content and order of the grading entries on the page. These tests collectively ensure that the grade audit trail feature is not only functioning correctly but also displaying the grading information in an orderly and expected manner, which is crucial for maintaining transparency and accountability in the grading process.