File tree 3 files changed +40
-6
lines changed
3 files changed +40
-6
lines changed Original file line number Diff line number Diff line change @@ -7,19 +7,13 @@ class GradingConflictsController < ApplicationController
7
7
before_action :require_admin_or_prof , only : [ :delete , :update ]
8
8
9
9
def index
10
-
11
10
if current_user . course_professor? ( @course ) || current_user . site_admin
12
11
@grading_conflicts = GradingConflict . where ( course : @course )
13
12
elsif current_user . course_assistant? ( @course )
14
13
@grading_conflicts = GradingConflict . where ( course : @course , staff : current_user )
15
14
else
16
15
@grading_conflicts = GradingConflict . where ( course : @course , student : current_user )
17
16
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
-
23
17
end
24
18
25
19
# TODO: Should there be a show method? May not be enough info/data
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ class GradingConflict < ApplicationRecord
3
3
# A GradingConflict is either not considered in allocations (inactive),
4
4
# used in allocating staff graders to students (active), or has been
5
5
# 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?
6
9
enum status : [ :inactive , :active , :pending ]
7
10
8
11
belongs_to :staff , class_name : "User"
Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments