Add supports_grade_by_question to assignment type
flag=platform_service_speedgrader refs EVAL-4291 Test Plan: - should be able to query supportsGradeByQuestion on assignments using graphiql Change-Id: Icdc6aa286d8e44980cdd570c826adfa24fd0c1eb Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/354453 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Spencer Olson <solson@instructure.com> QA-Review: Drake Harper <drake.harper@instructure.com> Product-Review: Drake Harper <drake.harper@instructure.com>
This commit is contained in:
parent
f1f09a5f6c
commit
e63c219374
|
@ -327,6 +327,8 @@ module Types
|
|||
load_association(:quiz)
|
||||
end
|
||||
|
||||
field :supports_grade_by_question, Boolean, method: :supports_grade_by_question?, null: false
|
||||
|
||||
field :discussion, Types::DiscussionType, null: true
|
||||
def discussion
|
||||
load_association(:discussion_topic)
|
||||
|
|
|
@ -993,4 +993,15 @@ describe Types::AssignmentType do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "supportsGradeByQuestion" do
|
||||
it "returns false when the assignment does not support grade by question" do
|
||||
expect(assignment_type.resolve("supportsGradeByQuestion")).to be false
|
||||
end
|
||||
|
||||
it "returns true when the assignment supports grade by question" do
|
||||
assignment.update!(submission_types: "online_quiz")
|
||||
expect(assignment_type.resolve("supportsGradeByQuestion")).to be true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue