CSC/ECE 517 Spring 2022 - E2237: Grading audit trail: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
 
(189 intermediate revisions by 3 users not shown)
Line 1: Line 1:


== Team ==
== Topic Overview & Prior Work (E2158) ==
=== Students ===
=== Feature Overview ===
*Bhuwan Bhatt (''brbhatt'')
 
*Soumyadeep Chatterjee (''schatte5'')
[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2021_-_E2158._Grading_audit_trail E2158] contains detailed information on the previous team's work with this feature.
*Kelly Fleming (''kflemin3'')
 
*Karthik Gopala Sundaresan (''kgopala3'')
'''A summary of the desired functionality is presented below:'''
 
Any instructor can assign or edit a grade freely.
 
There should be a way to track which instructor assigned or edited a grade, along with any comments they wrote justifying that grade.
 
These things must be recorded in the grading audit trail any time an instructor assigns or edits a grade and its comments:
* id of the instructor
* timestamp
Additionally, any comments written by other instructors should be preserved.
 
=== Overview of Major Changes By Previous Team ===
 
*A new table was added to the database ('''grading_history'''), along with the corresponding model ('''grading_history.rb''') and controller ('''grading_history_controller.rb''').
**Whenever an instructor submits a new grade, or edits an existing grade, the '''grading_history_controller''' saves a new history entry to the database.
 
*Two models for specific types of histories were added: '''review_grading_history.rb''', and '''submission_grading_history.rb'''.
 
*A view for displaying the grading history of a particular assignment or review was added ('''grading_histories/index.html.erb''').
 
=== Files Modified By Previous Team ===
* \app\controllers\grades_controller.rb
* \app\controllers\grading_histories_controller.rb
* \app\controllers\review_mapping_controller.rb
* \app\helpers\grading_histories_helper.rb
* \app\models\grading_history.rb
* \app\models\review_grading_history.rb
* \app\models\submission_grading_history.rb
* \app\views\assignments\list_submissions.html.erb
* \app\views\grading_histories\index.html.erb
* \app\views\reports\_review_report.html.erb
* \config\routes.rb
* \app\views\assignments\list_submissions.html.erb
 
=== Testing By Previous Team ===


=== Mentor ===
''Functional tests'' were added.
*Kai Xiao (''yxiao28'')
<pre>
functional tests added to these files
: spec/controllers/review_mapping_controller_spec.rb
: spec/models/grading_history.rb
: spec/controllers/grading_history_controller.rb
</pre>
A ''feature test'' ensuring that a submission's grading history is shown completely, and in chronological order, was added.
<pre>
feature test handled by these two files
: spec/features/grade_histories_spec.rb
: spec/features/helpers/grade_histories_helper.rb
</pre>
==== Issues with Existing Tests ====
Only review_mapping_controller_spec.rb runs successfully--'''every other spec file mentioned above crashes'''.


== Problem Statement ==
== Problem Statement ==
# For review grades, the “Grading History” link must not be in a separate column. It should be in smaller text below the “Save” button.
# In the view grading record page, remove the receiver column and add it to the title
# Restrict the column width on the grading record page
# Add comments on '''list_submissions.html.erb''' to indicate that the alignment was changed to fix code climate issues
# Ensure that white space changes are separate commits
# Revert changes made to '''list_review_mapping.html.erb'''
# Remove the '''_review_report.html.erb''' file
# Design doc – mention why each of those files were changed


== Summary of Previous Team's Work ==
''There are '''three areas of focus''' for our team's project (E2237):''
=== System Crashes and Object Creation ===
 
# We must ensure that the unit tests no longer crash, and that they pass with appropriate coverage.
# We must ensure that the creation of testing objects, namely, Assignments, and Project Bids, does not cause crashing.
 
=== Changes to Grading History View ===
 
The grading history table in the view is earmarked for certain changes:
# '''Student ID''' is a redundant field--move it to the page header.
# '''Assignment ID''' is a redundant field--move it to the page header.
 
=== Code and Documentation Goals ===
 
We must explain changes made to files with diagrams and justifications.
 
Explanations will be provided from these perspectives:
* data flow
* functions
* code comments
 
==Data Flow and Functionality==
===Old Data Flow===
The existing ''data flow'' for the grading history feature for reviews is shown below:
 
<span style="position:relative;left:0px;top:0px">[[File:Reviewhistory.jpg|270px]]</span>
<span style="position:relative;left:125px;top:0px">[[File:Review scores imported.png|560px]] </span>
 
The related ''table'' from the database is [https://expertiza.csc.ncsu.edu/index.php/Review_scores review_scores].
 
===New Data Flow===
 
The latest ''flow'' for the Grading History functionality is shown below:
 
[[File:kai_diagram1.jpg|345px]]
 
The primary function of this change is to DRY out the current implementation. The flow shown below tracks the tables where grades and comments(that comprise grading history) are recorded into already existing tables.  The newly created table '''grading_history''' is linked to the '''teams''' table from which comments and grades are drawn. This table then displays these values, thereby completing the functionality when the user clicks on display history. The '''grading_history''' table contains the team id and instructor_name
 
[[File:Kai_new_flow 3.jpg|650px]]
 
== Planned and Completed Work ==
 
=== General Design Goals ===
====Changes to the Grading History Table====
 
The images below reference grading history view issues mentioned above in the ''Problem Statement''.
 
To DRY the code, we will remove the redundant table data boxed below...
 
[[File:E2237_Proj4_1.png]]
 
<br> ...and we'll move it to the page header:
 
[[File:E2237_Proj4_2.png]]
 
<br>


You can read the entirety of the [[E1934 - Grading Audit Trail|previous team's wiki write-up]] if desired.
'''Behavior Driven Development'''<br>
[[CSC/ECE 517 Spring 2022 - E2237: Grading audit trail#RSpec Unit Tests|BDD Scenarios]]<br>
Due to the nature of the functionalities that we will be implementing, we will be following a BDD methodology - Our primary intention with this is to focus our refactoring, development and database design efforts to ensure that end-user functionality is implemented fully.<br>
In order to demonstrate this, we have provided our tests ahead of time and will be using them to guide our development efforts.


=== Overview of Major Changes ===
====System Stability: Strategies====
''The source of crashing issues is currently unknown.'' To debug this, we will pursue the following:
* Refactor the specs and controllers
** Ensure DRY principle is followed
** Improve readability and maintainability
** Add code comments as needed
* Ensure testing objects do not cause crashes


A new table was added to the database ('''grading_history'''), along with the corresponding model ('''grading_history.rb''') and controller ('''grading_history_controller.rb''').
====Documentation====
# Changes to any files will be documented on this page; the programmatical reasoning behind the changes shall be explained, and will be in accordance with the DRY principle.
# Any changes to the overall program logic and data flow will be illustrated with UML diagrams in this document, along with the reasoning for any such changes.
# A pull request of the fixed code, fully commented, will be provided in this document.


Two models for specific types of histories were added: '''review_grading_history.rb''', and '''submission_grading_history.rb'''.
== Implementation ==


A view for displaying the grading history of a particular assignment or review was added ('''index_html.erb''').
The following is a code snippet of the new view only, the grading history view. Other changes can be seen from the Pull Request linked at the end.


Whenever an instructor submits a new grade, or edits an existing grade, the '''grading_history_controller''' saves a new history entry to the database.
*/app/views/grading_histories/index.html.erb
<pre>
<% record = @grading_histories[0]
  if record == nil
    receiver = ""
    assignment = ""
  else
    if record.grading_type == "Submission"
      receiver = "of " + Team.where(id: record.grade_receiver_id).pluck(:name).first
      assignment = "for the submission " + Assignment.where(id: record.assignment_id).pluck(:name).first
    else
      receiver = "of " + User.where(id: record.grade_receiver_id).pluck(:fullname).first
      assignment = "for review in " + Assignment.where(id: record.assignment_id).pluck(:name).first
    end


=== Modifications to Existing Files ===
  end
%>
<h1 class="center">Grade History <%= receiver %> <%= assignment %></h1>


;app/controllers/grades_controller.rb
<table style="border-collapse:collapse; table-layout:fixed; width:1500px;">
: A grading history record is created for every edit to a submission's grade.
  <thead>
;app/controllers/review_mapping_controller.rb
  <tr>
: A grading history record is created for every edit to a review's grade.
    <th style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;">Instructor</th>
;app/views/assignments/list_submissions.html.erb
    <th style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;">Grade</th>
: A link to access a submission's grade history is shown in the submissions table.
    <th style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;">Comment</th>
;app/views/reports/_review_report.html.erb
    <th style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;">Graded At</th>
: A link to access a review's grade history is shown in the review report table.
  </tr>


=== Testing ===
  <!--This is the main view of the table. This will add table with either hyperlink or the content nased on the operation. -->
  <tbody>
  <% @grading_histories.each do |record| %>
    <tr>
      <td style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;"><%= User.where(id: record.instructor_id).pluck(:fullname).first %></td>
      <td style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;"><%= record.grade %></td>
      <td style="padding:10px; border:solid 1.5px black; width:60px; word-wrap:break-word;"><%= record.comment %></td>
      <td style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;"><%= record.created_at %></td>
    </tr>
  <% end %>
  </tbody>
</table>
</pre>


''Functional tests'' ensuring specific method calls are made were added.
*Screenshot of the Grading History Table


;functional tests added to these files
[[File:Submission_Grading_History_Table.jpeg|1000px]]
: spec/controllers/grades_controller_spec.rb
 
: spec/controllers/review_mapping_controller_spec.rb
The student ID and the Assignment ID have been moved to the header in accordance with the DRY principle. The redundant fields present in the table have also been removed.
: spec/controllers/grading_histories_controller_test.rb
We have created a factory for testing grading histories controller and included tests for grading_histories_controller, grades_controller and review_mapping_controller.
 
== Testing ==
=== Video Demonstration ===
 
[https://youtu.be/ItrCCEY1jR8 Live Demo: Functionality]<br>
[https://youtu.be/9x59twFwwC0 RSpec Test Demo]
 
=== Testing Goals and Test Objects ===
 
''Drawing from the project objectives:''
# Verify that Assignments can be created and are saved to the database.
# Ensure that Student ID is shown in the header, and verify via manual UI testing
# Ensure that Assignment ID is shown in the header, and verify via manual UI testing
# Finally, verify that tests can be run without crashing the system.
 
=== RSpec Unit Tests ===
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''
 
*Factory
<pre>
#Used for Grading Histories Controller Spec
factory :grading_history, class: GradingHistory do
    id 1
    instructor_id 6
    assignment_id 1
    grading_type 'Submission'
    grade_receiver_id 1
    grade 100
    comment 'Good work!'
end
</pre>
 
*Assignments
<pre>
Scenario: Assignment Creation with all fields
Given: Logged in as an Instructor/Admin
  When: Create Assignment with all the necessary fields
  Then: Assignment is saved in the database
 
Scenario: Duplicate Assignment Creation with all fields
Given: Logged in as an Instructor/Admin
  When: Create Assignment with all the necessary fields
  Then: Assignment already exists message is shown
 
Scenario: Assignment Creation without all fields
Given: Logged in as an Instructor/Admin
  When: Create Assignment without all the necessary fields
  Then: Message to input fields is shown
</pre>
 
*Grading Histories
<pre>
Scenario: Grading History creation
Given: A team exists for a particular assignment and has a submission
When: An instructor assigns a grade for that submission
Then: The grading history entry is created
</pre>
 
*Review Mapping
<pre>
Scenario: Save Reviewer Grade and Comment
Given: A student has given a review for a submission
When: An instructor assigns a grade for the review
Then: The assigned grade and the accompanying comment are saved
</pre>
 
*Grade
<pre>
Scenario: Save Grade and Comment for Submission
Given: A team has made a submission for an assignment
When: An instructor assigns a grade for the submission
Then: The assigned grade and the accompanying comment are saved
</pre>
 
=== Manual UI Tests ===
*Student ID in header
<pre>
Scenario: Student ID/Team ID (Receiver_ID) in grading history view
Logged in as an Instructor/Admin
  On Assignment page, click on Grading History
  Resulting Grading History Table is shown
    Receiver ID appears in the header, not in any table columns
</pre>
 
*Assignment Name in header
<pre>
Scenario: Assignment Name in grading history view
Logged in as an Instructor/Admin
  On Assignment page, click on Grading History
  Resulting Grading History Table is shown
    Assignment Name appears in the header, not in any table columns
</pre>
 
*Color change after Grade is assigned to a submission
<pre>
Scenario: Team_ID Color changes from blue to brown when grade is assigned 
Logged in as an Instructor of Course/Admin or TA assigned to Course
  On Assignment page, click on Etc->View Submissions
  All submissions for assignment are shown
    Team name is blue, and grade is not assigned
    Click on "Assign Grade" under team name
      Instructor/TA assigns grade, save successfully
      Back to submissions list, team name is now brown
</pre>


A ''feature test'' ensuring that correct grading history is shown in chronological order was added.
=== Regression Testing ===
''In order to ensure complete coverage, testing of the changes done between the end of last semester and this project will be done to ensure that ''
''old test cases still pass.''


;feature test handled by these two files
# Get the specific format requirement for the title, and assert that it's there. Ensure that this doesn't appear anywhere else (possible via ensuring count is 1)
: spec/features/grade_histories_spec.rb
# Procure specific required column width, and assert that this is the value in the file (the constant)
: spec/features/helpers/grade_histories_helper.rb


== Our Team's Design Proposal ==
== Conclusions and Future Work ==
=== Comprehensive Testing and Scope ===
* '''Initial Thoughts:''' Current code coverage cannot be determined due to a combination of missing tests and simulation crashes. This will need to be fixed to enable monitoring of regular metrics, and adding comprehensive tests that target full code coverage.
* '''TA Grade Editing Problems:''' The current version of beta branch has an issue wherein grades that have already been assigned cannot be changed by any TAs. This issue has been brought to the attention of the Expertiza team.


== Test Plan ==
=== Conclusion ===
(in progress)
* '''Functionality:''' The functionality regarding grading changes/trails has been demonstrably completed; Instructors can change grades for their assignment submissions, and the changes are reflected in the enw created Grading History Table.
1. Investigate if this is testable using Capybara
* '''Appearance:''' The requested layout of the Grading History table, with the student/teamID & the assignmentID at the header, along with the instructorID in it's own column on the left, is done, and is shown in the screenshots in this document.
2. Get the specific format requirement for the title, and assert that it's there. Ensure that this doesn't appear anywhere else (possible via ensuring count is 1)
* '''Testing:''' Tests have been added into Expertiza that ensure that the positive flows work as intended. More tests need to be added for completeness, as stated below.
3. Procure specific required column width, and assert that this is the value in the file (the constant)
* '''Future Work:''' More testing is required - with so many, more time & work is needed to add tests that ensure comprehensive coverage.
4. Inquire with mentor about comment requirement and conflicts
5. Inquire with mentor regarding white space constraints
6. Inquire why the revert is needed, what is breaking and why
7.  


== Useful Links ==
== Useful Links ==
[https://github.com/expertiza/expertiza/pull/1441 Previous team's Expertiza GitHub pull request]
[https://github.com/expertiza/expertiza/pull/2164 Previous team's Expertiza GitHub pull request]
 
[[CSC/ECE 517 Fall 2021 - E2158. Grading audit trail|Previous team's wiki write-up]]
 
[https://www.youtube.com/watch?v=yyxX_kRYxLc E1934 implementation video walkthrough]
 
[https://youtu.be/ItrCCEY1jR8 Live Demo: Functionality]
 
[https://youtu.be/9x59twFwwC0 RSpec Test Demo]


[[E1934 - Grading Audit Trail|Previous team's wiki write-up]]
[https://www.youtube.com/watch?v=YmXsANRlB5Q Updated RSpec Demo]


[https://www.youtube.com/watch?v=yyxX_kRYxLc Previous team's implementation video walkthrough]
[https://github.com/expertiza/expertiza/pull/2407 Pull Request]
 
== Contributors ==
=== Students ===
*Bhuwan Bhatt (''brbhatt'')
*Soumyadeep Chatterjee (''schatte5'')
*Kelly Fleming (''kflemin3'')
*Karthik Gopala Sundaresan (''kgopala3'')
=== Mentor ===
*Kai Xiao (''yxiao28'')

Latest revision as of 02:42, 1 May 2022

Topic Overview & Prior Work (E2158)

Feature Overview

E2158 contains detailed information on the previous team's work with this feature.

A summary of the desired functionality is presented below:

Any instructor can assign or edit a grade freely.

There should be a way to track which instructor assigned or edited a grade, along with any comments they wrote justifying that grade.

These things must be recorded in the grading audit trail any time an instructor assigns or edits a grade and its comments:

  • id of the instructor
  • timestamp

Additionally, any comments written by other instructors should be preserved.

Overview of Major Changes By Previous Team

  • A new table was added to the database (grading_history), along with the corresponding model (grading_history.rb) and controller (grading_history_controller.rb).
    • Whenever an instructor submits a new grade, or edits an existing grade, the grading_history_controller saves a new history entry to the database.
  • Two models for specific types of histories were added: review_grading_history.rb, and submission_grading_history.rb.
  • A view for displaying the grading history of a particular assignment or review was added (grading_histories/index.html.erb).

Files Modified By Previous Team

  • \app\controllers\grades_controller.rb
  • \app\controllers\grading_histories_controller.rb
  • \app\controllers\review_mapping_controller.rb
  • \app\helpers\grading_histories_helper.rb
  • \app\models\grading_history.rb
  • \app\models\review_grading_history.rb
  • \app\models\submission_grading_history.rb
  • \app\views\assignments\list_submissions.html.erb
  • \app\views\grading_histories\index.html.erb
  • \app\views\reports\_review_report.html.erb
  • \config\routes.rb
  • \app\views\assignments\list_submissions.html.erb

Testing By Previous Team

Functional tests were added.

functional tests added to these files
: spec/controllers/review_mapping_controller_spec.rb
: spec/models/grading_history.rb
: spec/controllers/grading_history_controller.rb

A feature test ensuring that a submission's grading history is shown completely, and in chronological order, was added.

feature test handled by these two files
: spec/features/grade_histories_spec.rb
: spec/features/helpers/grade_histories_helper.rb

Issues with Existing Tests

Only review_mapping_controller_spec.rb runs successfully--every other spec file mentioned above crashes.

Problem Statement

There are three areas of focus for our team's project (E2237):

System Crashes and Object Creation

  1. We must ensure that the unit tests no longer crash, and that they pass with appropriate coverage.
  2. We must ensure that the creation of testing objects, namely, Assignments, and Project Bids, does not cause crashing.

Changes to Grading History View

The grading history table in the view is earmarked for certain changes:

  1. Student ID is a redundant field--move it to the page header.
  2. Assignment ID is a redundant field--move it to the page header.

Code and Documentation Goals

We must explain changes made to files with diagrams and justifications.

Explanations will be provided from these perspectives:

  • data flow
  • functions
  • code comments

Data Flow and Functionality

Old Data Flow

The existing data flow for the grading history feature for reviews is shown below:

The related table from the database is review_scores.

New Data Flow

The latest flow for the Grading History functionality is shown below:

The primary function of this change is to DRY out the current implementation. The flow shown below tracks the tables where grades and comments(that comprise grading history) are recorded into already existing tables. The newly created table grading_history is linked to the teams table from which comments and grades are drawn. This table then displays these values, thereby completing the functionality when the user clicks on display history. The grading_history table contains the team id and instructor_name

Planned and Completed Work

General Design Goals

Changes to the Grading History Table

The images below reference grading history view issues mentioned above in the Problem Statement.

To DRY the code, we will remove the redundant table data boxed below...


...and we'll move it to the page header:


Behavior Driven Development
BDD Scenarios
Due to the nature of the functionalities that we will be implementing, we will be following a BDD methodology - Our primary intention with this is to focus our refactoring, development and database design efforts to ensure that end-user functionality is implemented fully.
In order to demonstrate this, we have provided our tests ahead of time and will be using them to guide our development efforts.

System Stability: Strategies

The source of crashing issues is currently unknown. To debug this, we will pursue the following:

  • Refactor the specs and controllers
    • Ensure DRY principle is followed
    • Improve readability and maintainability
    • Add code comments as needed
  • Ensure testing objects do not cause crashes

Documentation

  1. Changes to any files will be documented on this page; the programmatical reasoning behind the changes shall be explained, and will be in accordance with the DRY principle.
  2. Any changes to the overall program logic and data flow will be illustrated with UML diagrams in this document, along with the reasoning for any such changes.
  3. A pull request of the fixed code, fully commented, will be provided in this document.

Implementation

The following is a code snippet of the new view only, the grading history view. Other changes can be seen from the Pull Request linked at the end.

  • /app/views/grading_histories/index.html.erb
<% record = @grading_histories[0]
  if record == nil
    receiver = ""
    assignment = ""
  else
    if record.grading_type == "Submission"
      receiver = "of " + Team.where(id: record.grade_receiver_id).pluck(:name).first
      assignment = "for the submission " + Assignment.where(id: record.assignment_id).pluck(:name).first
    else
      receiver = "of " + User.where(id: record.grade_receiver_id).pluck(:fullname).first
      assignment = "for review in " + Assignment.where(id: record.assignment_id).pluck(:name).first
    end

  end
%>
<h1 class="center">Grade History <%= receiver %> <%= assignment %></h1>

<table style="border-collapse:collapse; table-layout:fixed; width:1500px;">
  <thead>
  <tr>
    <th style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;">Instructor</th>
    <th style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;">Grade</th>
    <th style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;">Comment</th>
    <th style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;">Graded At</th>
  </tr>

  <!--This is the main view of the table. This will add table with either hyperlink or the content nased on the operation. -->
  <tbody>
  <% @grading_histories.each do |record| %>
    <tr>
      <td style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;"><%= User.where(id: record.instructor_id).pluck(:fullname).first %></td>
      <td style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;"><%= record.grade %></td>
      <td style="padding:10px; border:solid 1.5px black; width:60px; word-wrap:break-word;"><%= record.comment %></td>
      <td style="padding:10px; border:solid 1.5px black; width:50px; word-wrap:break-word;"><%= record.created_at %></td>
    </tr>
  <% end %>
  </tbody>
</table>
  • Screenshot of the Grading History Table

The student ID and the Assignment ID have been moved to the header in accordance with the DRY principle. The redundant fields present in the table have also been removed. We have created a factory for testing grading histories controller and included tests for grading_histories_controller, grades_controller and review_mapping_controller.

Testing

Video Demonstration

Live Demo: Functionality
RSpec Test Demo

Testing Goals and Test Objects

Drawing from the project objectives:

  1. Verify that Assignments can be created and are saved to the database.
  2. Ensure that Student ID is shown in the header, and verify via manual UI testing
  3. Ensure that Assignment ID is shown in the header, and verify via manual UI testing
  4. Finally, verify that tests can be run without crashing the system.

RSpec Unit Tests

Test cases provided here, will add RSpec code blocks for the final submission

  • Factory
#Used for Grading Histories Controller Spec
factory :grading_history, class: GradingHistory do
    id 1
    instructor_id 6
    assignment_id 1
    grading_type 'Submission'
    grade_receiver_id 1
    grade 100
    comment 'Good work!'
end
  • Assignments
Scenario: Assignment Creation with all fields 
 Given: Logged in as an Instructor/Admin
  When: Create Assignment with all the necessary fields
   Then: Assignment is saved in the database

Scenario: Duplicate Assignment Creation with all fields 
 Given: Logged in as an Instructor/Admin
  When: Create Assignment with all the necessary fields
   Then: Assignment already exists message is shown

Scenario: Assignment Creation without all fields 
 Given: Logged in as an Instructor/Admin
  When: Create Assignment without all the necessary fields
   Then: Message to input fields is shown
  • Grading Histories
Scenario: Grading History creation
Given: A team exists for a particular assignment and has a submission
When: An instructor assigns a grade for that submission
Then: The grading history entry is created
  • Review Mapping
Scenario: Save Reviewer Grade and Comment
Given: A student has given a review for a submission
When: An instructor assigns a grade for the review
Then: The assigned grade and the accompanying comment are saved
  • Grade
Scenario: Save Grade and Comment for Submission
Given: A team has made a submission for an assignment
When: An instructor assigns a grade for the submission
Then: The assigned grade and the accompanying comment are saved

Manual UI Tests

  • Student ID in header
Scenario: Student ID/Team ID (Receiver_ID) in grading history view 
Logged in as an Instructor/Admin
  On Assignment page, click on Grading History
   Resulting Grading History Table is shown
    Receiver ID appears in the header, not in any table columns
  • Assignment Name in header
Scenario: Assignment Name in grading history view 
Logged in as an Instructor/Admin
  On Assignment page, click on Grading History
   Resulting Grading History Table is shown
    Assignment Name appears in the header, not in any table columns
  • Color change after Grade is assigned to a submission
Scenario: Team_ID Color changes from blue to brown when grade is assigned  
Logged in as an Instructor of Course/Admin or TA assigned to Course
  On Assignment page, click on Etc->View Submissions
   All submissions for assignment are shown
    Team name is blue, and grade is not assigned
     Click on "Assign Grade" under team name
      Instructor/TA assigns grade, save successfully
       Back to submissions list, team name is now brown

Regression Testing

In order to ensure complete coverage, testing of the changes done between the end of last semester and this project will be done to ensure that old test cases still pass.

  1. Get the specific format requirement for the title, and assert that it's there. Ensure that this doesn't appear anywhere else (possible via ensuring count is 1)
  2. Procure specific required column width, and assert that this is the value in the file (the constant)

Conclusions and Future Work

Comprehensive Testing and Scope

  • Initial Thoughts: Current code coverage cannot be determined due to a combination of missing tests and simulation crashes. This will need to be fixed to enable monitoring of regular metrics, and adding comprehensive tests that target full code coverage.
  • TA Grade Editing Problems: The current version of beta branch has an issue wherein grades that have already been assigned cannot be changed by any TAs. This issue has been brought to the attention of the Expertiza team.

Conclusion

  • Functionality: The functionality regarding grading changes/trails has been demonstrably completed; Instructors can change grades for their assignment submissions, and the changes are reflected in the enw created Grading History Table.
  • Appearance: The requested layout of the Grading History table, with the student/teamID & the assignmentID at the header, along with the instructorID in it's own column on the left, is done, and is shown in the screenshots in this document.
  • Testing: Tests have been added into Expertiza that ensure that the positive flows work as intended. More tests need to be added for completeness, as stated below.
  • Future Work: More testing is required - with so many, more time & work is needed to add tests that ensure comprehensive coverage.

Useful Links

Previous team's Expertiza GitHub pull request

Previous team's wiki write-up

E1934 implementation video walkthrough

Live Demo: Functionality

RSpec Test Demo

Updated RSpec Demo

Pull Request

Contributors

Students

  • Bhuwan Bhatt (brbhatt)
  • Soumyadeep Chatterjee (schatte5)
  • Kelly Fleming (kflemin3)
  • Karthik Gopala Sundaresan (kgopala3)

Mentor

  • Kai Xiao (yxiao28)