<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vmohan2</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vmohan2"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Vmohan2"/>
	<updated>2026-07-03T23:48:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1934_-_Grading_Audit_Trail&amp;diff=124664</id>
		<title>E1934 - Grading Audit Trail</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1934_-_Grading_Audit_Trail&amp;diff=124664"/>
		<updated>2019-04-27T02:22:08Z</updated>

		<summary type="html">&lt;p&gt;Vmohan2: Added feature test information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
After an instructor gave a grade to an assignment, there is no way to track who gave the grade.&lt;br /&gt;
A grading audit trail must be created and the following information needs to be stored: &lt;br /&gt;
:1. When a grade is assigned by an instructor, there needs to be an indication of who did it and when it was done. &lt;br /&gt;
:2. Comments previously provided by other instructors must also be preserved.&lt;br /&gt;
&lt;br /&gt;
This information needs to be stored every time an instructor edits a grade/comment and clicks the save button.&lt;br /&gt;
&lt;br /&gt;
Currently, there are two places need to add grading audit trail: &lt;br /&gt;
:1. '''Review grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Review Report&lt;br /&gt;
:2. '''Submission grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View submissions&lt;br /&gt;
&lt;br /&gt;
=='''Proposed Solution'''==&lt;br /&gt;
&lt;br /&gt;
===Design===&lt;br /&gt;
We created a database called grading_history in the system which stores elements of instructor id, assignment id, grade type, student id, grade, comment, and timestamp.&lt;br /&gt;
&lt;br /&gt;
We used MVC design to create a model, a controller, and a view for both of '''Review Grade''' and '''Submission Grade'''.&lt;br /&gt;
&lt;br /&gt;
:Model: grading_history.rb. Has a list of attributes contains instructor id, assignment id, grade type, student id, grade, comment, and timestamp.&lt;br /&gt;
:Controller: grading_history_controller.rb. Saves a new entry into the database every time a review grade or submission grade is saved&lt;br /&gt;
:View: index_html.erb. Displays current submission or review's grading history. An existing example of this is a submission record in the system.&lt;br /&gt;
&lt;br /&gt;
We modified grades controller, so that every time, a grade is submitted or edited, grading_history_controller.rb will call a method to create an entry saves into the database.&lt;br /&gt;
&lt;br /&gt;
===Expected View===&lt;br /&gt;
&lt;br /&gt;
==== The list submission page with the new &amp;quot;grade history&amp;quot; option====&lt;br /&gt;
[[Image: E1869-Screenshot-1.jpg|50]]&lt;br /&gt;
&lt;br /&gt;
==== The review report page with the new &amp;quot;grade history&amp;quot; option====&lt;br /&gt;
[[File:E1869-Screenshot-2.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Grade history for a given team====&lt;br /&gt;
[[File:E1869-Screenshot-3.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Diagram===&lt;br /&gt;
[[File:E1869_Grading_Audit_Trails_UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
=='''Testing Plan'''==&lt;br /&gt;
&lt;br /&gt;
Functional testing:&lt;br /&gt;
&lt;br /&gt;
1. Test if SubmissionGradeHistory.create is being called when a submission grade is changed. &lt;br /&gt;
   spec/controllers/grades_controller_spec.rb &lt;br /&gt;
&lt;br /&gt;
2. Test if ReviewGradeHistory.create is being called when a submission grade is changed. &lt;br /&gt;
   spec/controllers/review_mapping_controller_spec.rb &lt;br /&gt;
&lt;br /&gt;
3. Test if GradeHistory.where is being called when grading history button is clicked.&lt;br /&gt;
   spec/controllers/grading_histories_controller_test.rb&lt;br /&gt;
&lt;br /&gt;
Feature Testing:&lt;br /&gt;
&lt;br /&gt;
1. Test if the grading history is visible and shown in chronological order&lt;br /&gt;
   spec/features/grade_histories_spec.rb&lt;br /&gt;
   spec/features/helpers/grade_histories_helper.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Code Changes===&lt;br /&gt;
&lt;br /&gt;
==Files Modified==&lt;br /&gt;
*app/controllers/grades_controller.rb &lt;br /&gt;
'''&lt;br /&gt;
     Creates a Grading History Record for every Submission grade edited by the instructor for a Team. &lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
*app/controllers/review_mapping_controller.rb &lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
     Creates a Grading History Record for every Review grade edited by the instructor for a Student.&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
* app/views/assignments/list_submissions.html.erb &lt;br /&gt;
'''&lt;br /&gt;
     Add code to support view changes for Grade Record&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
* app/views/reports/_review_report.html.erb &lt;br /&gt;
'''&lt;br /&gt;
     Add code to support view changes for Grade Record&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
==Files Added==&lt;br /&gt;
&lt;br /&gt;
*app/controllers/grading_histories_controller.rb&lt;br /&gt;
'''&lt;br /&gt;
     Calls the grading history view after validating Submission and Review Type.&lt;br /&gt;
&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
*app/models/grading_history.rb &lt;br /&gt;
'''&lt;br /&gt;
     Model for Grading History.&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
*app/models/review_grading_history.rb &lt;br /&gt;
'''&lt;br /&gt;
     Model containing specifics of Review Grading History. Inherits Grading History.&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
*app/models/submission_grading_history.rb &lt;br /&gt;
'''&lt;br /&gt;
     Model containing specifics of Submission Grading History. Inherits Grading History.&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
*app/views/grading_history/index_html.erb&lt;br /&gt;
&lt;br /&gt;
'''&lt;br /&gt;
     This is a view for grading audit trail, it will display all grading histories of a submission/review&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
*spec/features/grade_histories_spec.rb&lt;br /&gt;
&lt;br /&gt;
'''&lt;br /&gt;
     Feature test to check if the grades appear in chronological order&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
*spec/features/helpers/grade_histories_helper.rb&lt;br /&gt;
&lt;br /&gt;
'''&lt;br /&gt;
     Helper file to facilitate the above mentioned feature test.&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
=='''Reference'''==&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza]&lt;br /&gt;
&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/CSC/E1869_GRADING_AUDIT_TRAIL Previous Project Documentation]&lt;br /&gt;
&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza_wiki]&lt;br /&gt;
&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation Expertiza Documentation]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/expertiza/expertiza Expertiza Github]&lt;/div&gt;</summary>
		<author><name>Vmohan2</name></author>
	</entry>
</feed>