bearcat 1.6.7 → 1.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bearcat.gemspec +1 -0
- data/lib/bearcat/client/new_quizzes.rb +45 -0
- data/lib/bearcat/version.rb +1 -1
- data/spec/bearcat/client/new_quizzes_spec.rb +146 -0
- data/spec/fixtures/new_quizzes/course_new_quiz.json +27 -0
- data/spec/fixtures/new_quizzes/course_new_quizzes.json +56 -0
- data/spec/fixtures/new_quizzes/new_quiz_item.json +35 -0
- data/spec/fixtures/new_quizzes/new_quiz_items.json +72 -0
- data/spec/fixtures/new_quizzes/new_quiz_report.json +14 -0
- data/spec/fixtures/new_quizzes/new_quiz_reports.json +26 -0
- data/spec/fixtures/new_quizzes/new_quiz_submission.json +12 -0
- data/spec/fixtures/new_quizzes/new_quiz_submissions.json +26 -0
- data/spec/helper.rb +4 -0
- metadata +41 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 337cd7a67b114dd3559fc9a44195a44f9376c7098b9a1e6cf09f72138f55567f
|
|
4
|
+
data.tar.gz: 14c8bc6ee1a7b9e4abfb2f3282fd9185e0a9dc01e8e3bd8594bfa6fd56c4a7f3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 531ca34f771e900afa6a85c375286b8703578e6f0a9bf7779e714e52ba810f541a0fd1e8aafeb29ea386b52dbd94c9b09bd26f34dd484f2017849aeff6775e05
|
|
7
|
+
data.tar.gz: b3ddac5050e046971423973dd5643149bbd7cc90d55be4f7d103145ffca07a5f6b09b03622f6101d07a5d22d725ee52de68822dd9dc7f3b4daee49b682c684d5
|
data/bearcat.gemspec
CHANGED
|
@@ -33,6 +33,7 @@ Gem::Specification.new do |gem|
|
|
|
33
33
|
gem.add_development_dependency "ffi", "~> 1.16.3"
|
|
34
34
|
|
|
35
35
|
gem.add_dependency "activesupport"
|
|
36
|
+
gem.add_dependency "faraday", "> 1.0", "< 2.0"
|
|
36
37
|
gem.add_dependency "footrest", ">= 0.2.2"
|
|
37
38
|
gem.add_dependency "rediconn", "~> 0.1.0"
|
|
38
39
|
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Bearcat
|
|
4
|
+
class Client < Footrest::Client
|
|
5
|
+
module NewQuizzes
|
|
6
|
+
extend ClientModule
|
|
7
|
+
|
|
8
|
+
prefix '/api/quiz/v1/courses/:course/' do
|
|
9
|
+
get :list_new_quizzes, 'quizzes'
|
|
10
|
+
post :create_new_quiz, 'quizzes'
|
|
11
|
+
|
|
12
|
+
prefix 'quizzes/:quiz/' do
|
|
13
|
+
get :new_quiz
|
|
14
|
+
patch :update_new_quiz
|
|
15
|
+
delete :delete_new_quiz
|
|
16
|
+
|
|
17
|
+
get :list_new_quiz_items, 'items'
|
|
18
|
+
post :create_new_quiz_item, 'items'
|
|
19
|
+
|
|
20
|
+
prefix 'items/:item/' do
|
|
21
|
+
get :new_quiz_item
|
|
22
|
+
patch :update_new_quiz_item
|
|
23
|
+
delete :delete_new_quiz_item
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
get :list_new_quiz_submissions, 'submissions'
|
|
27
|
+
post :create_new_quiz_submission, 'submissions'
|
|
28
|
+
|
|
29
|
+
prefix 'submissions/:submission/' do
|
|
30
|
+
get :new_quiz_submission
|
|
31
|
+
patch :update_new_quiz_submission
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
get :list_new_quiz_reports, 'reports'
|
|
35
|
+
post :create_new_quiz_report, 'reports'
|
|
36
|
+
|
|
37
|
+
prefix 'reports/:report/' do
|
|
38
|
+
get :new_quiz_report
|
|
39
|
+
delete :delete_new_quiz_report
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
data/lib/bearcat/version.rb
CHANGED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
require 'helper'
|
|
2
|
+
|
|
3
|
+
describe Bearcat::Client::NewQuizzes do
|
|
4
|
+
before do
|
|
5
|
+
@client = Bearcat::Client.new(prefix: 'http://canvas.instructure.com', token: 'test_token')
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
# Quizzes
|
|
9
|
+
it 'returns a list of new quizzes for a course' do
|
|
10
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes').to_return(json_response('new_quizzes/course_new_quizzes.json'))
|
|
11
|
+
quizzes = @client.list_new_quizzes('1')
|
|
12
|
+
quizzes.class.should eq(Bearcat::ApiArray)
|
|
13
|
+
quizzes.count.should == 2
|
|
14
|
+
quizzes.first['id'].should == '1'
|
|
15
|
+
quizzes.last['id'].should == '2'
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it 'returns a single new quiz' do
|
|
19
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1').to_return(json_response('new_quizzes/course_new_quiz.json'))
|
|
20
|
+
quiz = @client.new_quiz('1', '1')
|
|
21
|
+
quiz.should be_a Hash
|
|
22
|
+
quiz['id'].should == '1'
|
|
23
|
+
quiz[:id].should == '1'
|
|
24
|
+
quiz['grading_type'].should == 'points'
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it 'creates a new quiz' do
|
|
28
|
+
stub_post(@client, '/api/quiz/v1/courses/1/quizzes').to_return(json_response('new_quizzes/course_new_quiz.json'))
|
|
29
|
+
quiz = @client.create_new_quiz('1', { quiz: { title: 'Bearcat Test Quiz' } })
|
|
30
|
+
quiz.should be_a Hash
|
|
31
|
+
quiz['id'].should == '1'
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it 'updates a new quiz' do
|
|
35
|
+
stub_patch(@client, '/api/quiz/v1/courses/1/quizzes/1').to_return(json_response('new_quizzes/course_new_quiz.json'))
|
|
36
|
+
quiz = @client.update_new_quiz('1', '1', { quiz: { title: 'Updated Title' } })
|
|
37
|
+
quiz.should be_a Hash
|
|
38
|
+
quiz['id'].should == '1'
|
|
39
|
+
quiz[:id].should == '1'
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
it 'deletes a new quiz' do
|
|
43
|
+
stub_delete(@client, '/api/quiz/v1/courses/1/quizzes/1').to_return({})
|
|
44
|
+
expect { @client.delete_new_quiz('1', '1') }.not_to raise_error
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Items
|
|
48
|
+
it 'returns a list of items for a new quiz' do
|
|
49
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items').to_return(json_response('new_quizzes/new_quiz_items.json'))
|
|
50
|
+
items = @client.list_new_quiz_items('1', '1')
|
|
51
|
+
items.class.should eq(Bearcat::ApiArray)
|
|
52
|
+
items.count.should == 2
|
|
53
|
+
items.first['id'].should == '1'
|
|
54
|
+
items.first['entry_type'].should == 'Item'
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it 'returns a single new quiz item' do
|
|
58
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/items/1').to_return(json_response('new_quizzes/new_quiz_item.json'))
|
|
59
|
+
item = @client.new_quiz_item('1', '1', '1')
|
|
60
|
+
item.should be_a Hash
|
|
61
|
+
item['id'].should == '1'
|
|
62
|
+
item[:id].should == '1'
|
|
63
|
+
item['entry']['interaction_type_slug'].should == 'choice'
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
it 'creates a new quiz item' do
|
|
67
|
+
stub_post(@client, '/api/quiz/v1/courses/1/quizzes/1/items').to_return(json_response('new_quizzes/new_quiz_item.json'))
|
|
68
|
+
item = @client.create_new_quiz_item('1', '1', { item: { entry_type: 'Item', points_possible: 5, entry: { title: 'New Question' } } })
|
|
69
|
+
item.should be_a Hash
|
|
70
|
+
item['id'].should == '1'
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
it 'updates a new quiz item' do
|
|
74
|
+
stub_patch(@client, '/api/quiz/v1/courses/1/quizzes/1/items/1').to_return(json_response('new_quizzes/new_quiz_item.json'))
|
|
75
|
+
item = @client.update_new_quiz_item('1', '1', '1', { item: { points_possible: 10.0 } })
|
|
76
|
+
item.should be_a Hash
|
|
77
|
+
item['id'].should == '1'
|
|
78
|
+
item[:id].should == '1'
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
it 'deletes a new quiz item' do
|
|
82
|
+
stub_delete(@client, '/api/quiz/v1/courses/1/quizzes/1/items/1').to_return({})
|
|
83
|
+
expect { @client.delete_new_quiz_item('1', '1', '1') }.not_to raise_error
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Submissions
|
|
87
|
+
it 'returns a list of submissions for a new quiz' do
|
|
88
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/submissions').to_return(json_response('new_quizzes/new_quiz_submissions.json'))
|
|
89
|
+
submissions = @client.list_new_quiz_submissions('1', '1')
|
|
90
|
+
submissions.class.should eq(Bearcat::ApiArray)
|
|
91
|
+
submissions.count.should == 2
|
|
92
|
+
submissions.first['workflow_state'].should == 'complete'
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
it 'returns a single new quiz submission' do
|
|
96
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/submissions/1').to_return(json_response('new_quizzes/new_quiz_submission.json'))
|
|
97
|
+
submission = @client.new_quiz_submission('1', '1', '1')
|
|
98
|
+
submission.should be_a Hash
|
|
99
|
+
submission['workflow_state'].should == 'complete'
|
|
100
|
+
submission[:workflow_state].should == 'complete'
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
it 'creates a new quiz submission' do
|
|
104
|
+
stub_post(@client, '/api/quiz/v1/courses/1/quizzes/1/submissions').to_return(json_response('new_quizzes/new_quiz_submission.json'))
|
|
105
|
+
submission = @client.create_new_quiz_submission('1', '1')
|
|
106
|
+
submission.should be_a Hash
|
|
107
|
+
submission['id'].should == '1'
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
it 'updates a new quiz submission' do
|
|
111
|
+
stub_patch(@client, '/api/quiz/v1/courses/1/quizzes/1/submissions/1').to_return(json_response('new_quizzes/new_quiz_submission.json'))
|
|
112
|
+
submission = @client.update_new_quiz_submission('1', '1', '1', { workflow_state: 'complete' })
|
|
113
|
+
submission.should be_a Hash
|
|
114
|
+
submission['id'].should == '1'
|
|
115
|
+
submission[:id].should == '1'
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Reports
|
|
119
|
+
it 'returns a list of reports for a new quiz' do
|
|
120
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/reports').to_return(json_response('new_quizzes/new_quiz_reports.json'))
|
|
121
|
+
reports = @client.list_new_quiz_reports('1', '1')
|
|
122
|
+
reports.class.should eq(Bearcat::ApiArray)
|
|
123
|
+
reports.count.should == 2
|
|
124
|
+
reports.first['workflow_state'].should == 'complete'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
it 'returns a single new quiz report' do
|
|
128
|
+
stub_get(@client, '/api/quiz/v1/courses/1/quizzes/1/reports/1').to_return(json_response('new_quizzes/new_quiz_report.json'))
|
|
129
|
+
report = @client.new_quiz_report('1', '1', '1')
|
|
130
|
+
report.should be_a Hash
|
|
131
|
+
report['workflow_state'].should == 'complete'
|
|
132
|
+
report[:workflow_state].should == 'complete'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
it 'creates a new quiz report' do
|
|
136
|
+
stub_post(@client, '/api/quiz/v1/courses/1/quizzes/1/reports').to_return(json_response('new_quizzes/new_quiz_report.json'))
|
|
137
|
+
report = @client.create_new_quiz_report('1', '1', { report: { report_type: 'student_analysis' } })
|
|
138
|
+
report.should be_a Hash
|
|
139
|
+
report['id'].should == '1'
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
it 'deletes a new quiz report' do
|
|
143
|
+
stub_delete(@client, '/api/quiz/v1/courses/1/quizzes/1/reports/1').to_return({})
|
|
144
|
+
expect { @client.delete_new_quiz_report('1', '1', '1') }.not_to raise_error
|
|
145
|
+
end
|
|
146
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "1",
|
|
3
|
+
"title": "Bearcat Test Quiz",
|
|
4
|
+
"instructions": null,
|
|
5
|
+
"assignment_group_id": "1",
|
|
6
|
+
"points_possible": 10.0,
|
|
7
|
+
"due_at": null,
|
|
8
|
+
"lock_at": null,
|
|
9
|
+
"unlock_at": null,
|
|
10
|
+
"published": false,
|
|
11
|
+
"grading_type": "points",
|
|
12
|
+
"quiz_settings": {
|
|
13
|
+
"calculator_type": "none",
|
|
14
|
+
"filter_ip_address": false,
|
|
15
|
+
"filters": {},
|
|
16
|
+
"one_at_a_time_type": "none",
|
|
17
|
+
"allow_backtracking": true,
|
|
18
|
+
"shuffle_answers": false,
|
|
19
|
+
"shuffle_questions": false,
|
|
20
|
+
"require_student_access_code": false,
|
|
21
|
+
"student_access_code": null,
|
|
22
|
+
"has_time_limit": false,
|
|
23
|
+
"session_time_limit_in_seconds": 0,
|
|
24
|
+
"multiple_attempts": {},
|
|
25
|
+
"result_view_settings": {}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "1",
|
|
4
|
+
"title": "Bearcat Test Quiz",
|
|
5
|
+
"instructions": null,
|
|
6
|
+
"assignment_group_id": "1",
|
|
7
|
+
"points_possible": 10.0,
|
|
8
|
+
"due_at": null,
|
|
9
|
+
"lock_at": null,
|
|
10
|
+
"unlock_at": null,
|
|
11
|
+
"published": false,
|
|
12
|
+
"grading_type": "points",
|
|
13
|
+
"quiz_settings": {
|
|
14
|
+
"calculator_type": "none",
|
|
15
|
+
"filter_ip_address": false,
|
|
16
|
+
"filters": {},
|
|
17
|
+
"one_at_a_time_type": "none",
|
|
18
|
+
"allow_backtracking": true,
|
|
19
|
+
"shuffle_answers": false,
|
|
20
|
+
"shuffle_questions": false,
|
|
21
|
+
"require_student_access_code": false,
|
|
22
|
+
"student_access_code": null,
|
|
23
|
+
"has_time_limit": false,
|
|
24
|
+
"session_time_limit_in_seconds": 0,
|
|
25
|
+
"multiple_attempts": {},
|
|
26
|
+
"result_view_settings": {}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "2",
|
|
31
|
+
"title": "Second Bearcat Quiz",
|
|
32
|
+
"instructions": null,
|
|
33
|
+
"assignment_group_id": "1",
|
|
34
|
+
"points_possible": 20.0,
|
|
35
|
+
"due_at": null,
|
|
36
|
+
"lock_at": null,
|
|
37
|
+
"unlock_at": null,
|
|
38
|
+
"published": true,
|
|
39
|
+
"grading_type": "points",
|
|
40
|
+
"quiz_settings": {
|
|
41
|
+
"calculator_type": "none",
|
|
42
|
+
"filter_ip_address": false,
|
|
43
|
+
"filters": {},
|
|
44
|
+
"one_at_a_time_type": "none",
|
|
45
|
+
"allow_backtracking": true,
|
|
46
|
+
"shuffle_answers": false,
|
|
47
|
+
"shuffle_questions": false,
|
|
48
|
+
"require_student_access_code": false,
|
|
49
|
+
"student_access_code": null,
|
|
50
|
+
"has_time_limit": false,
|
|
51
|
+
"session_time_limit_in_seconds": 0,
|
|
52
|
+
"multiple_attempts": {},
|
|
53
|
+
"result_view_settings": {}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "1",
|
|
3
|
+
"position": 1,
|
|
4
|
+
"points_possible": 5.0,
|
|
5
|
+
"properties": {},
|
|
6
|
+
"entry_type": "Item",
|
|
7
|
+
"entry_editable": true,
|
|
8
|
+
"stimulus_quiz_entry_id": "",
|
|
9
|
+
"status": "mutable",
|
|
10
|
+
"entry": {
|
|
11
|
+
"id": "1",
|
|
12
|
+
"title": "What color is the sky?",
|
|
13
|
+
"item_body": "<p>What color is the sky?</p>",
|
|
14
|
+
"calculator_type": "none",
|
|
15
|
+
"interaction_data": {
|
|
16
|
+
"choices": [
|
|
17
|
+
{ "id": "choice1", "position": 1, "item_body": "Blue" },
|
|
18
|
+
{ "id": "choice2", "position": 2, "item_body": "Green" },
|
|
19
|
+
{ "id": "choice3", "position": 3, "item_body": "Red" }
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"properties": {
|
|
23
|
+
"shuffle_rules": { "choices": { "shuffled": false } },
|
|
24
|
+
"vary_points_by_answer": false
|
|
25
|
+
},
|
|
26
|
+
"scoring_data": { "value": "choice1" },
|
|
27
|
+
"answer_feedback": {},
|
|
28
|
+
"scoring_algorithm": "Equivalence",
|
|
29
|
+
"created_at": "2026-04-22T20:01:27.286Z",
|
|
30
|
+
"updated_at": "2026-04-22T20:01:27.286Z",
|
|
31
|
+
"tag_associations": [],
|
|
32
|
+
"interaction_type_slug": "choice",
|
|
33
|
+
"feedback": {}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "1",
|
|
4
|
+
"position": 1,
|
|
5
|
+
"points_possible": 5.0,
|
|
6
|
+
"properties": {},
|
|
7
|
+
"entry_type": "Item",
|
|
8
|
+
"entry_editable": true,
|
|
9
|
+
"stimulus_quiz_entry_id": "",
|
|
10
|
+
"status": "mutable",
|
|
11
|
+
"entry": {
|
|
12
|
+
"id": "1",
|
|
13
|
+
"title": "What color is the sky?",
|
|
14
|
+
"item_body": "<p>What color is the sky?</p>",
|
|
15
|
+
"calculator_type": "none",
|
|
16
|
+
"interaction_data": {
|
|
17
|
+
"choices": [
|
|
18
|
+
{ "id": "choice1", "position": 1, "item_body": "Blue" },
|
|
19
|
+
{ "id": "choice2", "position": 2, "item_body": "Green" },
|
|
20
|
+
{ "id": "choice3", "position": 3, "item_body": "Red" }
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"properties": {
|
|
24
|
+
"shuffle_rules": { "choices": { "shuffled": false } },
|
|
25
|
+
"vary_points_by_answer": false
|
|
26
|
+
},
|
|
27
|
+
"scoring_data": { "value": "choice1" },
|
|
28
|
+
"answer_feedback": {},
|
|
29
|
+
"scoring_algorithm": "Equivalence",
|
|
30
|
+
"created_at": "2026-04-22T20:01:27.286Z",
|
|
31
|
+
"updated_at": "2026-04-22T20:01:27.286Z",
|
|
32
|
+
"tag_associations": [],
|
|
33
|
+
"interaction_type_slug": "choice",
|
|
34
|
+
"feedback": {}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "2",
|
|
39
|
+
"position": 2,
|
|
40
|
+
"points_possible": 5.0,
|
|
41
|
+
"properties": {},
|
|
42
|
+
"entry_type": "Item",
|
|
43
|
+
"entry_editable": true,
|
|
44
|
+
"stimulus_quiz_entry_id": "",
|
|
45
|
+
"status": "mutable",
|
|
46
|
+
"entry": {
|
|
47
|
+
"id": "2",
|
|
48
|
+
"title": "What is 2 + 2?",
|
|
49
|
+
"item_body": "<p>What is 2 + 2?</p>",
|
|
50
|
+
"calculator_type": "none",
|
|
51
|
+
"interaction_data": {
|
|
52
|
+
"choices": [
|
|
53
|
+
{ "id": "choice4", "position": 1, "item_body": "3" },
|
|
54
|
+
{ "id": "choice5", "position": 2, "item_body": "4" },
|
|
55
|
+
{ "id": "choice6", "position": 3, "item_body": "5" }
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"properties": {
|
|
59
|
+
"shuffle_rules": { "choices": { "shuffled": false } },
|
|
60
|
+
"vary_points_by_answer": false
|
|
61
|
+
},
|
|
62
|
+
"scoring_data": { "value": "choice5" },
|
|
63
|
+
"answer_feedback": {},
|
|
64
|
+
"scoring_algorithm": "Equivalence",
|
|
65
|
+
"created_at": "2026-04-22T20:02:00.000Z",
|
|
66
|
+
"updated_at": "2026-04-22T20:02:00.000Z",
|
|
67
|
+
"tag_associations": [],
|
|
68
|
+
"interaction_type_slug": "choice",
|
|
69
|
+
"feedback": {}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "1",
|
|
3
|
+
"quiz_id": "1",
|
|
4
|
+
"report_type": "student_analysis",
|
|
5
|
+
"workflow_state": "complete",
|
|
6
|
+
"progress": 100,
|
|
7
|
+
"created_at": "2026-04-01T10:00:00Z",
|
|
8
|
+
"updated_at": "2026-04-01T10:01:00Z",
|
|
9
|
+
"file": {
|
|
10
|
+
"url": "https://canvas.instructure.com/files/1/download",
|
|
11
|
+
"display_name": "student_analysis.csv",
|
|
12
|
+
"size": 2048
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "1",
|
|
4
|
+
"quiz_id": "1",
|
|
5
|
+
"report_type": "student_analysis",
|
|
6
|
+
"workflow_state": "complete",
|
|
7
|
+
"progress": 100,
|
|
8
|
+
"created_at": "2026-04-01T10:00:00Z",
|
|
9
|
+
"updated_at": "2026-04-01T10:01:00Z",
|
|
10
|
+
"file": {
|
|
11
|
+
"url": "https://canvas.instructure.com/files/1/download",
|
|
12
|
+
"display_name": "student_analysis.csv",
|
|
13
|
+
"size": 2048
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "2",
|
|
18
|
+
"quiz_id": "1",
|
|
19
|
+
"report_type": "item_analysis",
|
|
20
|
+
"workflow_state": "running",
|
|
21
|
+
"progress": 45,
|
|
22
|
+
"created_at": "2026-04-01T11:00:00Z",
|
|
23
|
+
"updated_at": "2026-04-01T11:00:30Z",
|
|
24
|
+
"file": null
|
|
25
|
+
}
|
|
26
|
+
]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "1",
|
|
4
|
+
"quiz_id": "1",
|
|
5
|
+
"user_id": "1",
|
|
6
|
+
"workflow_state": "complete",
|
|
7
|
+
"score": 8.0,
|
|
8
|
+
"kept_score": 8.0,
|
|
9
|
+
"attempt": 1,
|
|
10
|
+
"started_at": "2026-04-01T10:00:00Z",
|
|
11
|
+
"finished_at": "2026-04-01T10:15:00Z",
|
|
12
|
+
"time_spent": 900
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "2",
|
|
16
|
+
"quiz_id": "1",
|
|
17
|
+
"user_id": "2",
|
|
18
|
+
"workflow_state": "in_progress",
|
|
19
|
+
"score": null,
|
|
20
|
+
"kept_score": null,
|
|
21
|
+
"attempt": 1,
|
|
22
|
+
"started_at": "2026-04-01T11:00:00Z",
|
|
23
|
+
"finished_at": null,
|
|
24
|
+
"time_spent": null
|
|
25
|
+
}
|
|
26
|
+
]
|
data/spec/helper.rb
CHANGED
|
@@ -24,6 +24,10 @@ def stub_put(client, url)
|
|
|
24
24
|
stub_request(:put, "#{client.config[:prefix]}#{url}")
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
def stub_patch(client, url)
|
|
28
|
+
stub_request(:patch, "#{client.config[:prefix]}#{url}")
|
|
29
|
+
end
|
|
30
|
+
|
|
27
31
|
def stub_delete(client, url)
|
|
28
32
|
stub_request(:delete, "#{client.config[:prefix]}#{url}")
|
|
29
33
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bearcat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Instructure CustomDev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -122,6 +122,26 @@ dependencies:
|
|
|
122
122
|
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
124
|
version: '0'
|
|
125
|
+
- !ruby/object:Gem::Dependency
|
|
126
|
+
name: faraday
|
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
|
128
|
+
requirements:
|
|
129
|
+
- - ">"
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: '1.0'
|
|
132
|
+
- - "<"
|
|
133
|
+
- !ruby/object:Gem::Version
|
|
134
|
+
version: '2.0'
|
|
135
|
+
type: :runtime
|
|
136
|
+
prerelease: false
|
|
137
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
138
|
+
requirements:
|
|
139
|
+
- - ">"
|
|
140
|
+
- !ruby/object:Gem::Version
|
|
141
|
+
version: '1.0'
|
|
142
|
+
- - "<"
|
|
143
|
+
- !ruby/object:Gem::Version
|
|
144
|
+
version: '2.0'
|
|
125
145
|
- !ruby/object:Gem::Dependency
|
|
126
146
|
name: footrest
|
|
127
147
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -195,6 +215,7 @@ files:
|
|
|
195
215
|
- lib/bearcat/client/logins.rb
|
|
196
216
|
- lib/bearcat/client/module_items.rb
|
|
197
217
|
- lib/bearcat/client/modules.rb
|
|
218
|
+
- lib/bearcat/client/new_quizzes.rb
|
|
198
219
|
- lib/bearcat/client/o_auth2.rb
|
|
199
220
|
- lib/bearcat/client/outcome_groups.rb
|
|
200
221
|
- lib/bearcat/client/outcome_imports.rb
|
|
@@ -259,6 +280,7 @@ files:
|
|
|
259
280
|
- spec/bearcat/client/learning_outcomes_spec.rb
|
|
260
281
|
- spec/bearcat/client/module_items_spec.rb
|
|
261
282
|
- spec/bearcat/client/modules_spec.rb
|
|
283
|
+
- spec/bearcat/client/new_quizzes_spec.rb
|
|
262
284
|
- spec/bearcat/client/o_auth2_spec.rb
|
|
263
285
|
- spec/bearcat/client/outcome_groups_spec.rb
|
|
264
286
|
- spec/bearcat/client/outcomes_spec.rb
|
|
@@ -383,6 +405,14 @@ files:
|
|
|
383
405
|
- spec/fixtures/module_item_sequence.json
|
|
384
406
|
- spec/fixtures/module_items.json
|
|
385
407
|
- spec/fixtures/modules.json
|
|
408
|
+
- spec/fixtures/new_quizzes/course_new_quiz.json
|
|
409
|
+
- spec/fixtures/new_quizzes/course_new_quizzes.json
|
|
410
|
+
- spec/fixtures/new_quizzes/new_quiz_item.json
|
|
411
|
+
- spec/fixtures/new_quizzes/new_quiz_items.json
|
|
412
|
+
- spec/fixtures/new_quizzes/new_quiz_report.json
|
|
413
|
+
- spec/fixtures/new_quizzes/new_quiz_reports.json
|
|
414
|
+
- spec/fixtures/new_quizzes/new_quiz_submission.json
|
|
415
|
+
- spec/fixtures/new_quizzes/new_quiz_submissions.json
|
|
386
416
|
- spec/fixtures/no_custom_data.json
|
|
387
417
|
- spec/fixtures/ok.json
|
|
388
418
|
- spec/fixtures/outcome_group_import.json
|
|
@@ -453,6 +483,7 @@ test_files:
|
|
|
453
483
|
- spec/bearcat/stub_bearcat_spec.rb
|
|
454
484
|
- spec/bearcat/client/canvas_files_spec.rb
|
|
455
485
|
- spec/bearcat/client/folders_spec.rb
|
|
486
|
+
- spec/bearcat/client/new_quizzes_spec.rb
|
|
456
487
|
- spec/bearcat/client/conferences_spec.rb
|
|
457
488
|
- spec/bearcat/client/conversations_spec.rb
|
|
458
489
|
- spec/bearcat/client/outcome_groups_spec.rb
|
|
@@ -564,6 +595,14 @@ test_files:
|
|
|
564
595
|
- spec/fixtures/update_outcome_group.json
|
|
565
596
|
- spec/fixtures/module_item.json
|
|
566
597
|
- spec/fixtures/report_status.json
|
|
598
|
+
- spec/fixtures/new_quizzes/course_new_quizzes.json
|
|
599
|
+
- spec/fixtures/new_quizzes/new_quiz_submission.json
|
|
600
|
+
- spec/fixtures/new_quizzes/new_quiz_items.json
|
|
601
|
+
- spec/fixtures/new_quizzes/new_quiz_report.json
|
|
602
|
+
- spec/fixtures/new_quizzes/new_quiz_submissions.json
|
|
603
|
+
- spec/fixtures/new_quizzes/new_quiz_reports.json
|
|
604
|
+
- spec/fixtures/new_quizzes/new_quiz_item.json
|
|
605
|
+
- spec/fixtures/new_quizzes/course_new_quiz.json
|
|
567
606
|
- spec/fixtures/enroll_student.json
|
|
568
607
|
- spec/fixtures/group_category.json
|
|
569
608
|
- spec/fixtures/delete_group_category.json
|