Skip to content

Commit ed0c7fb

Browse files
williams-jackblerner
williams-jack
authored andcommitted
Added documentation for Grading Conflicts.
1 parent ce16a56 commit ed0c7fb

File tree

3 files changed

+40
-6
lines changed

3 files changed

+40
-6
lines changed

app/controllers/grading_conflicts_controller.rb

-6
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,13 @@ class GradingConflictsController < ApplicationController
77
before_action :require_admin_or_prof, only: [:delete, :update]
88

99
def index
10-
1110
if current_user.course_professor?(@course) || current_user.site_admin
1211
@grading_conflicts = GradingConflict.where(course: @course)
1312
elsif current_user.course_assistant?(@course)
1413
@grading_conflicts = GradingConflict.where(course: @course, staff: current_user)
1514
else
1615
@grading_conflicts = GradingConflict.where(course: @course, student: current_user)
1716
end
18-
19-
# @active_and_inactive_conflicts = grading_conflicts.where(status: :inactive)
20-
# .or(grading_conflicts.where(status: :active))
21-
# @pending_conflicts = grading_conflicts.where(status: :pending)
22-
2317
end
2418

2519
# TODO: Should there be a show method? May not be enough info/data

app/models/grading_conflict.rb

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ class GradingConflict < ApplicationRecord
33
# A GradingConflict is either not considered in allocations (inactive),
44
# used in allocating staff graders to students (active), or has been
55
# requested by a student and is awaiting approval (pending).
6+
7+
# TODO: Should we have a *denied* status as well, for those
8+
# that are disapproved and thus not considered?
69
enum status: [:inactive, :active, :pending]
710

811
belongs_to :staff, class_name: "User"

doc/grading-conflict.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Grading Conflicts
2+
3+
**NOTE:** _Grader_ in the context of this document refers to a course grader/assistant -- a.k.a., a user who can grade a
4+
student's assignment. This is not the same as a StyleGrader, ManualGrader, etc.
5+
6+
## Purpose
7+
8+
A `GradingConflict` is a model developed to represent the existence of a conflict between a course grader/assistant
9+
and a student. This is used to in conjunction with operations allocating graders to student submissions, in that a grader should
10+
NOT grade a student's submission if a conflict exists between them and the student.
11+
12+
## Data Definition
13+
14+
A `GradingConflict` contains the following data (fields):
15+
16+
- `course`: The `Course` associated with the conflicted student and staff
17+
- `staff`: A `User` who is a Grader/Assistant for the course
18+
- `student`: A `User` who is a Student in the course
19+
- `status`: Status determining if the `GradingConflict` is in use/waiting approval. a `status` is an enumerable of either:
20+
21+
- `:inactive` - Not used when determining grader allocations.
22+
- `:active` - Used when determining grader allocations.
23+
- `:pending` - Awaiting approval by a course professor or site admin.
24+
25+
- `activity`: JSON used to log changes to the `GradingConflict`; more on this below.
26+
27+
`GradingConflict` models also have timestamps for when they are created and updated.
28+
29+
### The `activity` Field
30+
31+
TODO
32+
33+
### `status` Rules/Invariants
34+
35+
TODO
36+
37+
## Usage

0 commit comments

Comments
 (0)